How can I stop listbox default selection

G

Gordon Bownes

When I bind a collection to a listbox with MultiSimple selection enabled,
the first list item is automatically selected. How can I prevent this
default action.
 
H

Herfried K. Wagner [MVP]

* "Gordon Bownes said:
When I bind a collection to a listbox with MultiSimple selection enabled,
the first list item is automatically selected. How can I prevent this
default action.

Set its 'SelectedIndex' property to -1 /twice/.
 

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

Top