I'm dealing with the fact that when I clear items in a combobox programmatically, the text do not change and keep the last selected item.
How can I do it?
I'm dealing with the fact that when I clear items in a combobox programmatically, the text do not change and keep the last selected item.
How can I do it?
Try
comboBox.SelectedIndex = -1;
Or
comboBox.Items.Clear();
comboBox.ResetText();
Another way for combo boxes:
Populate
comboBox1.DataSource = new string[] { "", "bruce", "clark", "tony" };
Clear
comboBox1.DataSource = null;