databinding multiple list controls to the same datasource

DannyT

Freshman
Joined
Apr 14, 2005
Messages
36
On my form I have a combobox and 2 checklistboxes, I'm trying to populate them all from the same datasource (an arraylist).

The populating is fine, however once populated, if I select something in the combobox, the same items get selected in the other two lists?!

I didn't think an arraylist has a "selected" property or collection so why is it doing this?

I want to bind to the same datasource but allow each of the lists to have their own different selections???
 
You need to create an instance of something called a CurrencyManager for each control and bind to this. Search MSDN and you should find an example or two.

If not reply here and I'll try to dig up a sample later on today.
 
Thanks plausibly, i've just been looking at this. However, all i can find is examples of how to keep the same selections on bound controls. E.g. clicking a next button will increment a "current item" textfield and also the selected item in a combo.

My form seems to already be doing this but I don't want it to, if you can come up with any samples that'd be great. I'll post back if I find anything too.

Cheers,
Dan
 
Back
Top