Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the different?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00817137
Message ID:
00817327
Vues:
23
Hi Stephen,

What is happening here is that the ValueMember of the ComboBox is being set after the DataSource. This causes the SelectedIndexChanged event to fire during initialization. If Kevin reverses the order of the population of the properties, this extra firing will not occur. I'm sure Kevin will look at this after he returns. You can detach the event in the Form_Load to prevent the unwanted event from firing and then reattach it after the binding of the control for now or you can leave you code as you have it.

>Correction, the SelectedValue initially contains a DataRowView instead of DataRow. Before the form actually shown on the screen, the SelectedIndexChanged event fired 3 times, the first 2 times SelectedValue contains DataRowView but the last time it contains integer.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform