Is there any property to remove the first (and empty) item in a combobox with style DropDownList ? In other words, I would like to choose the default selected item for a combobox.
I know i can validate the selected item with code, but i want to avoid showing message boxes to the user.
Set the comboBox.SelectedIndex
property to 0 to set the selection to the first item in the combobox.
You should set the Text
or SelectedIndex
or SelectedValue
property. In this way the combobox updates the text that's is showing and removes the first empty item (that actually is not a real item).
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