My code example is:
string[] string_suggestion = {"suman goa - SGMN","sugar khamaturan - SKMN","goan kuman - GKMN","karan thapa - TTMN"};
var source = new AutoCompleteStringCollection();
source.AddRange(string_suggestion);
textBox1.AutoCompleteCustomSource = source;
textBox1.AutoCompleteMode = AutoCompleteMode.Suggest;
textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
// there are more than 1000 words
Questions are:
- When user type "su" then suggestion come up words with S like:-suman goa - SGTMN,sugar khamaturan - SGKMN
- But when User Type "SG" which come after "-" in string, it is not appear in suggestion
When user type anything first word Or Last word divided by "-", come up entire string "suman goa - SGTMN" as a suggestion.