Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two ComboBoxes one datasource
Message
De
17/08/2009 12:58:07
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Divers
Thread ID:
01418478
Message ID:
01418502
Vues:
64
This message has been marked as a message which has helped to the initial question of the thread.
>Hey Guys, I am having an interesting issue. I have two combos that have the same late bound datasource designed to allow the user to select a subset of the dataset. One Start combo and one stop combo. The code is way simple.
>
>
>            ui_FpStartComboBox.DataSource = Common.FpFolders; //Common.FpFolders is an existing DataTable
>            ui_FpStartComboBox.DisplayMember = "FpFolders";
>            ui_FpStartComboBox.ValueMember = "FpFolders";
>
>            ui_FpStopComboBox.DataSource = Common.FpFolders;
>            ui_FpStopComboBox.DisplayMember = "FpFolders";
>            ui_FpStopComboBox.ValueMember = "FpFolders";
>
>The problem is when you select a value in one combo the value of both combos changes to the selected value. This is true when using the mouse or the arrow keys. There are no events registered and I have deleted and recreated the combos with new names. Any combos on the page using the datasource display the same item.

IIRC this is standard behaviour. You'll need different datasources for each instance. Maybe make a list from the dataset and use that for one of them?

>My humble thanks in advance,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform