winforms - C# Textbox AutoComplete: Limit to ~50 suggestions -


I am working with a text box in C # which is a database (Access SQL) record lookup by ID number Functions as input. I want to be able to use autocomplete on the text box, but some limitations.

The big problem is that the number of IDs in the system is on the order of thousands, so once instead of filling the full box full of them, I need to pay attention to what is in the text box And when there are options 50 or less then only show autocomplete suggestions

Currently, I'm querying this on each key down menu: select WHERE ID from the table 'textbox.text%' < / P>

When the calculation is less than 50 I Autocomplete with results from a selection ID version of the device. This has caused me many problems, most C # quirks I do not understand.

1) When I clear or add autocompleteCustomSet within a single KeyDown event, the actual key is not pressed into the string added (i.e. the normal text box does not behave in the input).

2) I tried to isolate completely the set up update on a different event (keypause or keyboard) but it would either show a crash, or autocomplete display briefly before being hidden only .

I think this problem should be normal and I am going wrong about it. Can someone give advice? Thanks!

Edit: This is a Windows form

EDIT2: A Top 50 selection does not fix the problem that the user type (and possibly backspace and re-type) as the top 50 will change

Did you try a text conversion event instead? I hope that after the text box the event will be removed which has been updated, thus avoid the quotes you mention.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -