Autocomplete - add and get only the text that the user has entered into the combobox
I have ComboBox
one that I set up like this:
this.cmbCustomerJob.DisplayMember = "display";
this.cmbCustomerJob.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
this.cmbCustomerJob.AutoCompleteSource = AutoCompleteSource.ListItems;
this.cmbCustomerJob.DropDownStyle = ComboBoxStyle.DropDown;
However I fiddled with the event KeyPressed
to prevent the user from typing a new term in ComboBox
, however when I do cmbCustomerJob.Text
it returns even the suggested part, how can I only get what the user typed?
+1
source to share