Live Chat Icon For mobile
Live Chat Icon

In my databound ComboBox, how do I set the SelectedItem property

Platform: WinForms| Category: Data Binding

Use the FindStringExact method. For example, if you have set the ComboBox’s ValueMember property to ‘OrderID’, then you could call

comboBox1.SelectedIndex = comboBox1.FindStringExact(stringOrderID);

where stringOrderID is the ‘orderID’ of the row to be selected.

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.