Urgent Help : Re-select Combobox Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
SelectedItem doesn't work as well. Do you have another way?

Stephany Young said:
SelectedItem


Mae Lim said:
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
 
SelectedItem *DOES* work...

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

Mae Lim said:
SelectedItem doesn't work as well. Do you have another way?

Stephany Young said:
SelectedItem


Mae Lim said:
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
 
Back
Top