Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
two combobox are there both have items 1 and 2.if one is selected in one combobox then 2 must be selected in other.if we try to select one again in second combobox it should show messang 1 is alrady selected.please tell me how to write the logic.
Posted
Comments
Sergey Alexandrovich Kryukov 11-Dec-11 2:27am    
First, why? And what's the problem?
--SA
M Kiran Kumar 11-Dec-11 2:44am    
I am failing to implement .....first I maintained a list of selected items in a int list but one may change the selection of exising selected items in the combobox.at that time alrady selected item must be removed from the list and new selected
item must be added to list.plz tell me how to implement this...

1 solution

Personally? I would handle the SelectedValueChanged event for the first ComboBox and set the appropriate value in the second, then disable the second so the user could not change it. It's much more user friendly to prevent the user making mistakes in the first place, than to tell him off afterwards.
 
Share this answer
 
Comments
M Kiran Kumar 11-Dec-11 3:58am    
Thank....for the solution....

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