Im using c# .net windows form application. I have a database with some tables.I have two comboboxes (A & B). I have populated a combo box A with column names of a table using sys.columns. Now when i select an item in combo box A ,combo box B should be populated with the same items except the selected item which was selected in combobox A .
Share
You should delete either this question or this one which are about identical things. anyway, here is my identical answer:
in the selected item changed event of A, add code which clears B, then loops round each item in A’s Item collection and adds it to B as long as the index of the current item is different from the index of the SelectedItem in A.
Something like (pseudo code, not tested)
or
should do it as well.