0
Reply

deselecting items in listbox after certain other item choosen.

Car H

Car H

Feb 23 2009 5:20 AM
5.4k
I have list box on a windows form in windows application app in VB.NET, the list box contains 9 items, the items are populated from a database.
The values selected on the listbox are then used to built up a SQL statement which is then sent to create a report.
My problem is, I want the list box to deselect all other options when one particular one is selected,

Item 1
Item 2
Item 3
Item 4

So Items 2,3 4 can all be selected together, but when Item 1 is selected I want all others to be deselect in the SelectedIndexChanged event.
Any ideas?