Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding + Controls
Message
De
14/02/2008 15:34:35
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01292720
Message ID:
01292776
Vues:
21
Derek,

>It seems like the salesperson_combobox.DataSource = salespersontable wants to control the position in customertable.Rows[]

Yes it does, that's why I said you needed to use a copy. You said in a previous post that you tried that already and it didn't work. It should have worked, but maybe if you do it like this it will:
// Declarations
DataTable oTable;

// Setting the DataSource
this.oTable = SalesPersonTable.Copy()
salesperson_combobox.DataSource = this.oTable
// etc.etc. DisplayMember and ValueMember setting
Are you also DataBinding the SelectedValue? You should be:
salesperson_combobox.DataBindings.Add("SelectedValue", MyDataSet.MyTable, "MyColumn");
~~Bonnie



>
>The only solution that works is setting salesperson_combobox.BindingContext = new BindingContext() but I do not know what else this will affect.
>
>When I do this, the combobox works, the customertable.Rows[] are properly updated (even with the correct salesperson_combobox.ValueMember)!
>
>What affect would there be by adding a new BindingContext() to every combobox or listbox on every form? I do not do binding navigation, I just bind for data (control to Row[]).
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform