Set ComboBox Position

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

Guest

Hi,

Anyone nows how can I read all values in a ComboBox, and set "visible" one of them?

Thanks for your help,
 
From what I understand, you have a combo box and you want to search it for a
specific value. You can use something like this:

for(int i =0; i > cboList.Items.Count; i++)
{
if(cboList.Items.value == sSomeValue)
cboList.SelectedIndex = i;
}

That will work if you are trying to find the value of the item in the combo
box. Otherwise, you should try replacing the value property that we are
testing with the text property.

Hi,

Anyone nows how can I read all values in a ComboBox, and set "visible" one
of them?

Thanks for your help,
 
Back
Top