blah blah blah is here! blah blah » Close

up0down
link

Hi
i need ur help friends. i have a text box in which i am entering alpha. data .i want to know that how i can fetch data into textbox based on alphabet entered. i am working on c#.net

last answered 2 years ago

1 answers

up0down
link

in the designer view in properties of the textbox set the following:
AutoCompleteMode -> SuggestAppend
AutoCompleteSource -> CustomSource

in the code store the needed texts to filter the text written in the textbox by adding the keys to the AutoCompleteSource. For example:

AutoCompleteStringCollection suggestions = new AutoCompleteStringCollection();
suggestions.Add("key1");
suggestions.Add("key2");
suggestions.Add("key3");
suggestions.Add("key4");
suggestions.Add("key11");
suggestions.Add("key16");
suggestions.Add("key25");
suggestions.Add("key27");
textBox1.AutoCompleteCustomSource = suggestions;

Feedback