I have a Combo box, binded to a dataset
With cmbCompany
.DataSource = dsSpecContact
.DisplayMember = "Companies.Comp anyName"
.ValueMember = "Companies.Comp anyID"
End With
What I want is to change the SelectedIndex of this Combo Box by using the
ValueMember or DisplayMemver values. I mean the "Companies.Comp anyID" or
"Companies.Comp anyName".
Some how I have to iterate through all the item in Combo Box and find which
item has ValueMember = "Companies.Comp anyID" or DisplayMember =
"Companies.Comp anyName" and select it.
Does anyone know how to do that, couse I can't figure it out
TIA
With cmbCompany
.DataSource = dsSpecContact
.DisplayMember = "Companies.Comp anyName"
.ValueMember = "Companies.Comp anyID"
End With
What I want is to change the SelectedIndex of this Combo Box by using the
ValueMember or DisplayMemver values. I mean the "Companies.Comp anyID" or
"Companies.Comp anyName".
Some how I have to iterate through all the item in Combo Box and find which
item has ValueMember = "Companies.Comp anyID" or DisplayMember =
"Companies.Comp anyName" and select it.
Does anyone know how to do that, couse I can't figure it out
TIA
Comment