-
Sep 26th, 2008, 04:07 PM
#1
Thread Starter
Hyperactive Member
[2008] Multiple Combos with one list
Hello, I've got a number of combos in my application each showing the same information. I set the combo's datasource with a list that I get through a (LINQ) query. I want to just run this query once (save on database load) but use the same list throughout the program. The list is actually quite big (a customer list) and I would rather not have 10 copies of it littered throughout memory. My question is, is there a way I can have 5 combos (or two or whatever) each having their list items initialized from the same list but WITHOUT having the selected indices on all of them changing when I change the selectedindex on one of them?
The situation i am running into now is that when I change the selectedItem on one combo they are all changing and the various events that each one is supposed to trigger are all triggering.
Is there a way I can initialize multiple datasources from the same list while not actually being tied to the lists position?
Thanks,
jerome
-
Sep 26th, 2008, 04:44 PM
#2
Lively Member
Re: [2008] Multiple Combos with one list
Psychlotron,
One way to make the comboboxes independent of each other is to assign each combobox a new binding context. For example:
ComboBox1.BindingContext = New BindingContext
Do that for each of the comboboxes and then they should be independent.
Kerry Moorman
-
Sep 26th, 2008, 05:08 PM
#3
Thread Starter
Hyperactive Member
Re: [2008] Multiple Combos with one list
Ok, Thanks KMoorman. I'll give that a try over the weekend.
-Psychlotron
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
|