Click here to Skip to main content
15,938,446 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my form there are 2 combo box 1.State 2.City
As per selection of state combo box value, values in city combo box should change.

Is any one know logic behind this?
Posted

Hi Yogi,

On the text change event of parent combo box, populate the values of child combo box based on the selected value of parent combo.
 
Share this answer
 
how to populate values of child combo box.

can you give me more hints or give me code for the same.

Thanks in advance.
 
Share this answer
 
On
C#
SelectedIndexChanged
event of parent combo box pass the selected value to a method that calculates the expected value for the child combo box and then make a list for that values and assign that list to the child combo box's
C#
DataSource
property.
 
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