Versions des environnements
>>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement