Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two ComboBoxes one datasource
Message
From
19/08/2009 04:14:53
 
 
To
19/08/2009 02:00:48
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Miscellaneous
Thread ID:
01418478
Message ID:
01418875
Views:
43
>>>What do you do if you need to bind that back to the data?
>
>What you fill the ComboBox with (setting the DataSource) and what you bind the user's choice to (setting the DataBindings) are two different things. Making a choice in the combo, saves the choice to the databound table, which is not the same table as what is used to fill the combo (the DataSource).
>
>Oh, and BTW ... setting the DataSource for two different Combos to MyTable.Copy() for each one *is* the correct way to handle this situation.

Hi,
I'd question whether creating an additional copy of the table is always the best option. Since the ComboBox is only going to use a couple of fields it many cases might it not be more efficient to create a more lightweight source? (That said I'm immersed in WPF databinding and EntityFramework so my recollection of WinForms binding is admittedly vague :-{ )
Best,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform