Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two ComboBoxes one datasource
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Two ComboBoxes one datasource
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Divers
Thread ID:
01418478
Message ID:
01418478
Vues:
113
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.

My humble thanks in advance,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform