Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Autocomplete functionality without a control

Tags:

.net

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

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

and so I want the strings back that would have showed up in the autocomplete, so to speak.

like image 563
Rahul Avatar asked Dec 31 '25 04:12

Rahul


1 Answers

If you want fast autocomplete, you're going to want to implement a trie. You can find all the items that start with a particular string by following the trie down until the "starts with" string ends.

like image 134
Zach Johnson Avatar answered Jan 06 '26 21:01

Zach Johnson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!