Deselect combobox

  • Thread starter Thread starter Christian Dokman
  • Start date Start date
C

Christian Dokman

Hello,

When I bind a datasource to a combobox, the first item is always
selected, also when I set the SelectedValue property to -1 or 0. Also
when I call the form's bindingcontext.AddNew, the combobox is not always
showing an empty value.

Does anyone know how to deselect all items in a combobox in a way that
always works fine?

Greetings,
Christian.
 
** Note we do it twice, this will deselect it.

Me.ComboBox1.SelectedIndex = -1
Me.ComboBox1.SelectedIndex = -1

Regards - OHM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top