Note, I screwed up and asked how to get DisplayMember text, I meant to put ValueMember...
I have a combo box I'm populating from a datatable. It has two columns, one for display and one for value. I can find the index of the associated item in the combobox list using the FindString method, but how do I retrieve the value member string from the return of this?
Dim selectedText as String = ""
Dim indexitem As Integer = ComboBox1.FindString(ComboBox1.Text)
ComboBox1.SelectedItem = indexitem 'If I type the value in the combo box, selected item is nothing
selectedText = ComboBox1.SelectedValue.ToString 'Throws Null Reference Exception if user typed in value into combobox rather than selecting
Debug.Print("Found {0} at index {1}, which turns out to be code: {2}", ComboBox.Text, indexitem.ToString, selectedText)