Groups | Blog | Home
all groups > dotnet windows forms > march 2005 >

dotnet windows forms : Urgent Help : Re-select Combobox Value


Mae Lim
3/31/2005 10:49:01 PM
Dear all,

I'm doing a winform project which uses "ComboBox" in one of the form. The
winform contains "ComboBox" with the values as below: -

this.ComboBox1.Items.AddRange(new object[] {"Apple", "Orange", "StrawBerry"});

Users will select on of the item from the combobox and stored into database.
Users have the rights to update this record.

The question is, how do I select the combobox value base on the value from
database?

I have used "SelectedText", "SelectedValue", but it doesn't seem to be
working.

Please Help. Thanks in advance.

Cheers,
Mae Lim
4/1/2005 1:55:01 AM
SelectedItem doesn't work as well. Do you have another way?

[quoted text, click to view]
Dick
4/1/2005 2:59:02 AM
SelectedItem *DOES* work...

With ComboBox1
.Items.AddRange(New Object() {"Apple", "Orange", "StrawBerry"})
.SelectedItem = "Apple"
End With

[quoted text, click to view]
Stephany Young
4/1/2005 7:08:15 PM
SelectedItem


[quoted text, click to view]

AddThis Social Bookmark Button