1
Answer

Combobox display issue: SelectedValue

Daniel

Daniel

17y
1.9k
1
I have a combobox on a form that is bound to a datatable. I am setting the SelectedItem property. The text (DisplayMember) is not displayed when I do this. I have also tried to set the SelectedIndex as well. Neither worked. I can set the Combobox.SelectedValue property for every value in the table except for 1. I even tried hardcoding it...Combobox.SelectedValue = 1...that didn't work. Combobox.SelectedValue = 2 works fine. And yes, I do have records in the lookup table corresponding to both 1 and 2. I did find that the actual text (display member) IS changing when I changed the SelectedValue, but it is not displayed in the combo box. Thanks
Answers (1)