I have ComboBox.SelectedIndex = -1;
set for a combobox in a windows form.
However when I open the form it loads in the first value from the DB rather than blank.
I have used ComboBox.SelectedIndex = -1;
on other forms and it works correctly in showing a blank.
It sits inside:
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{
employeeIDComboBox.SelectedIndex = -1;
}
Which is showing:
Working on another form with the same code:
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{
regComboBox.SelectedIndex = -1;
}
Which works showing: