|
-
Jan 21st, 2021, 11:53 AM
#10
Re: Help with best practice for loading data
You probably shouldn't be looking through the combobox at all. I'm feeling that I'm misunderstanding something about the design. It sounds like you want to do something for either ALL owners, or for just the selected owner. There are two ways this could be interpreted, so I see two possible designs that don't have all that much in common.
The one is where you are doing something anyways, and you may or may not want to restrict by owner. Kind of like whether or not you add a WHERE clause onto a SELECT query. In that case, you'd use the selected item from the combobox if you wanted to deal with just that one owner, and do nothing otherwise.
The other design would be where you want to do something for each owner in some set of owners, but there always has to be an owner for the action to make sense. In that case, if no owner was selected in the combobox, you'd iterate through all the owners in My.Application.Owners, and if there was an owner selected, then you'd just do the action using the selecteditem from the combobox.
I'm not sure that I described the difference between those two with any clarity.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|