C
Chris Zopers
Hello,
I can't seem to unselect comboboxes in VB.NET.
I've set the datasource, valuemember and displaymember properties of the
combobox. The first item from the datasource is always selected in the
combobox, even when I set the SelectedIndex property to -1.
I've read the common used solution that setting the SelectedIndex
property twice to -1 should work:
ComboBox.SelectedIndex = -1
ComboBox.SelectedIndex = -1
But that solution doesn't seem to work either!!!
In the load event, nothing helps to unselect comboboxes. When I use
SelectedIndex = -1 in a button-event, it works just fine, but all
comboboxes should be unselected right after loading the form.
Does anyone have a good solution for this problem?
Greetings,
Chris.
I can't seem to unselect comboboxes in VB.NET.
I've set the datasource, valuemember and displaymember properties of the
combobox. The first item from the datasource is always selected in the
combobox, even when I set the SelectedIndex property to -1.
I've read the common used solution that setting the SelectedIndex
property twice to -1 should work:
ComboBox.SelectedIndex = -1
ComboBox.SelectedIndex = -1
But that solution doesn't seem to work either!!!
In the load event, nothing helps to unselect comboboxes. When I use
SelectedIndex = -1 in a button-event, it works just fine, but all
comboboxes should be unselected right after loading the form.
Does anyone have a good solution for this problem?
Greetings,
Chris.