FindByText

  • Thread starter Thread starter acko bogicevic
  • Start date Start date
A

acko bogicevic

I have combobox which is filled from database.
Afterwords i will get a criteria for searching a combo by value.
Hao can i make item in combo to be selected when value in combo match
critiria.
Thanks
 
Searching for value:

ComboBox1.SelectedIndex=ComboBox1.Items.IndexOf(ComboBox1.Items.FindByValue(
"value_to_search_for"))

Searching for text:

ComboBox1.SelectedIndex=ComboBox1.Items.IndexOf(ComboBox1.Items.FindByText("
text_to_search_for"))
 
Back
Top