c#textbox autocomplete KeyDown事件 [英] c# textbox autocomplete KeyDown event

查看:125
本文介绍了c#textbox autocomplete KeyDown事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有自动完成的textbox1 ..但是当我按下键向上和向下移动建议列表时它不会这样做它只是关闭列表而不是浏览列表



如何解决这个问题

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

推荐答案

我想你可能会对自动完成TextBoxes,ComboBoxes和ListBoxes感到有些困惑。自动完成TextBox无法按照您的建议运行。不需要提供KeyDown事件;只是自动完成将提供的条目列表。该列表可以是动态的。请参阅MSDN文章https://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode(v = vs.90).aspx。
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.


我认为您需要在文本框中实现自动填充数据。使用AJAX自动完成扩展程序来解决这个问题。



你应该在这里看到我的完整博客....

使用AJAX Extender从数据库中自动完成文本框 > eSoftCode |编码社区
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


这篇关于c#textbox autocomplete KeyDown事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆