Reputation: 1411
I'm trying to autocomplete a textbox. I'm retrieving values from Access Database. Just one field from a data table. If anyone can help me.
Upvotes: 2
Views: 2765
Reputation: 12954
AutoCompleteStringCollection autoCompleteList =
new AutoCompleteStringCollection();
/* copy your datacolumn in to autoCompleteList iteratively here */
txtBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; /* or just Suggest */
txtBox.AutoCompleteCustomSource = autoCompleteList;
Upvotes: 4