How to disable combobox items

chandrubngit

Member
Joined
Jul 30, 2008
Messages
9
Programming Experience
Beginner
hi i'm using vb.net 2003 version.I have added 4 items to the list using collection property.On some condition i need to disable a particular item (say for ex. item no 2) in the combo box list items so that user can't able to select this item.

pls suggest me the solution.
 
One way to do it is to use the SelectedIndexChanged event and if the user's selected a non-selectable item then change SelectedIndex += 1
 
Back
Top