Reputation: 145
I have a ComboBox control of DropDown type which contains items "Vx", "V", "G", "g".
The problem is: when I open dropdown list, item "Vx" highlighted as selected, not "V". So I assume combobox uses FindString to find SelectedItem - so search result is equivalent to first matched item by case-insensitive string.StartsWith.
The question is: how I can override this behaviour to find full-matched item? I need case-sensitive search with full equivalent of strings, not only StartsWith. For entered "V" i need item "V" (not "Vx") to be selected when combobox dropdown list is opening.
Thank you for replies.
Upvotes: 2
Views: 818
Reputation: 1390
Do you need to type in the combo box? If not, change the DropDownStyle
to DropDownList
.
Upvotes: 1