How to get Autocomplete functionality without control

If you send a list of lines to an edit control and set the autocomplete mode and source, you automatically get autocomplete functions. My question is: can I get the same functionality in .NET somewhere without control. In other words, I want something like:

string[] ProgressivePartialMatch( string[] Strings, string MatchText )

and so I want the lines that might appear in autocomplete, so to speak.

+3
source share
3 answers

If you need fast autocompletion, you will want to implement trie . You can find all elements that start with a specific line, following the trie until the line "starts with" ends.

+1

ajax (jQuery ). javascript ( jQuery) . , ?

P.S.

jQuery Autocomplete ASP.NET

0

If this does not exist, it’s easy to write yourself

string[] ProgressivePartialMatch(string[] Strings, string MatchText)
{
    return Strings.Where(s => s.StartsWith(MatchText)).ToArray();
}
0
source

Source: https://habr.com/ru/post/1738824/


All Articles