views:

197

answers:

1

Hi,

I had added the items 1 2 3 to the combobox.

Then I gave the "Select" to the text of the combobox.

How can I able to reset combobox to select the text("Select").

I had tried by giving -1 to the SelectedIndex. But it gives only Empty.

This is for VB.NET Windows Application

I have given an Image for your reference

Image path for the reference http://www.drivehq.com/file/df.aspx/publish/rk.babu/Files/ComboBoxReset.jpg

Thanks. Babu Kumarasamy.

[1]:

+1  A: 

Set 0 value to SelectedIndex property. It will select 1st list item.

 private Sub button1_Click(sender as object,e as  EventArgs) Handles button1.Click
                comboBox1.SelectedIndex = 0
            End Sub
adatapost
Sorry this if for vb.net windows application project
Babu Kumarasamy
I have given image for your referencehttp://www.drivehq.com/file/df.aspx/publish/rk.babu/Files/ComboBoxReset.jpg
Babu Kumarasamy
First item of list collection must be "Select".
adatapost