Enter key clear combobox text when enter key is pressed.
In my project I use autocomplete combobox and dropdown style is simple. Autocomplete works fine but when I press enter key text in combobox is cleared. How to prevent clearing combobox text when enter key is pressed.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Ravi KumarRank #2,085 · 690 reputationPosted Oct 13, 2014, 4:20 AM EDT
how your calling that method.
Hemant SrivastavaRank #581 · 4.2K reputationPosted Oct 13, 2014, 9:48 AM EDT
Did you set AutoCompleteMode to 'SuggestAppend' instead of just 'Suggest'?
If it helps you, mark it accepted answer.
Ranjit PowarRank #553 · 4.4K reputationPosted Oct 13, 2014, 11:36 PM EDT
Hemant SrivastavaRank #581 · 4.2K reputationPosted Oct 15, 2014, 6:55 PM EDT
If you set some of ComboBox properties as below, It should work:
AllowDrop = True
AutoCompleteMode = SuggestAppend
AutoCompleteSource = ListItems
DropDownStyle = DropDown