I have some combo-boxes that are set up as drop down lists, and the user can pick a number in them. I also have a Clear button that should clear the text from the combo boxe
You can use
Cbo.Items.Clear();
or
Cbo.DataSource = null;
if you have a binding on it.
cboxHour.Items.Clear();
this works
Mine worked with:
ComboBox.removeAllItems();
If it doesn't read that well its, remove all items.
You can try the below option for clearing the selected text and all items from the ComboBox.
comboBox1.SelectedIndex = -1;
comboBox1.Items.Clear();
I have just changed the text of the combobox, like this:
Combobox.Text = "Select...";
If there is value binding part for your combobox. Use below code to clear its value:
cboxHour.SetSelectedIndex(-1);