Click here to Skip to main content
15,902,893 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 2 combobox one of them based on the other's selected value so how can I populate the dependant combobox

thanks
Posted
Comments
Manfred Rudolf Bihy 21-Nov-10 16:59pm    
What have you tried so far?

1 solution

Hello Hazem,

look at ComboBox's events SelectedIndexChanged, SelectedValueChanged and the property SelectedItem. So when CB A has a selection change you
populate CB B appropriately.

Populating CB B:

MIDL
comboBox1.Items.Clear();
comboBox1.Items.Add(new Item("Blue", 1));
...
...



Cheers

Manfred
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900