determine combobox item is selected
if i populate combobox with sqldataadapter and sqldatatable then how can i determine weather combobox has selected item or empty
if i populate combobox with sqldataadapter and sqldatatable then how can i determine weather combobox has selected item or empty
if (myCombo.SelectedItem == null) { //item not selected, do something, set error in error provider for combo, set the focus to the como or something else like message box. } |
Extra info:
myCombo.SelectedIndex will be -1 if nothing is selected.
Greetz,
Geert
Geert Verhoeven
Consultant @ Ausy Belgium