Friday 5 June 2009

HOWTO: Clearing combobox in Visual Basic

need to clear a combobox in vb.net, but not remove the items from the combobox?

ComboBox2.Items.Clear() will remove all items from the combobox.
so try this,

ComboBox2.SelectedIndex = -1

cheers,


No comments: