I have a ComboBox
control with the DropDownStyle
properties set to DropDownList
.
Once there is an item selected, how can I clear the selection from the ComboBox
without deleting any Items in it ?
I'd normally use something like that:
myComboBox.Text.Clear();
But I can't do that. Any idea how I could clear it ?
You could change SelectedIndex
property:
comboBox1.SelectedIndex = -1;
The only way I could get it to work:
comboBox1.Text = "";
For some reason ionden's solution didn't work for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With