Click here to Skip to main content
15,850,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have textbox1 that is autocomplete .. but when I press key up and down to move in the suggested list it doesn't do that it just close the list instead of navigating through the list

how to fix that problem
Posted
Comments
CHill60 24-Dec-15 11:47am    
I'm not seeing this behaviour in WinForms so what are you using? (WPF, ASP?)
Do you have any events wired up to the TextBox that could change the way it handles keys?
gggustafson 24-Dec-15 11:49am    
I think you may be a little confused by autocomplete TextBoxes, ComboBoxes, and ListBoxes. An autocomplete TextBox does not operate the way you suggest. No KeyDown event needs to be provided; just the list of entries that autocomplete will provide. That list can be dynamic. See the MSDN article https://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode(v=vs.90).aspx.
BillWoodruff 24-Dec-15 12:37pm    
If this were posted as a solution, you'd get my #5.
gggustafson 24-Dec-15 12:49pm    
OK, added as a solution. Regards and Happy Holidays.

I think you may be a little confused by autocomplete TextBoxes, ComboBoxes, and ListBoxes. An autocomplete TextBox does not operate the way you suggest. No KeyDown event needs to be provided; just the list of entries that autocomplete will provide. That list can be dynamic. See the MSDN article https://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode(v=vs.90).aspx.
 
Share this answer
 
I think you need to implement autocomplete data in a textbox. Use AJAX autocomplete extender for this problem.

You should see my complete blog here....
Autocomplete Textbox from Database with AJAX Extender on eSoftCode | Coding Community
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900