有关.net C#帮助中的自定义下拉列表的问题!!!谢谢. [英] a question about the customize dropdownlist in .net C# help!!! Thanks.

查看:60
本文介绍了有关.net C#帮助中的自定义下拉列表的问题!!!谢谢.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的天才,

我完成了自定义下拉列表的代码,该下拉列表不仅可以编写,还可以选择已经拥有的项目.但是我不知道在下拉列表中写东西时搜索存在的项目.帮助!!!非常感谢.

例如,当我想选择名为"12345"的项目时.一旦我输入单词"1",它就会出现在项目"12345"上.然后,我可以在单击该项目后立即选择它.帮助!!!!

Dear genius,

I finished the code in customizing a dropdownlist which can not only write but also select the items which already had. But I have no idea in searching the item which are existing while write something in the dropdownlist. HELP!!! Thank you very much.

For example , when I would like to select the item which named "12345". As soon as I typed the word--"1" , it comes to the item "12345". And then I can select the item as soon as I click it. Help!!!!

推荐答案

尝试在您的下拉菜单中添加以下内容:
Try adding the following to your dropdown:
comboBox1.AutoCompleteMode = AutoCompleteMode.Suggest;
comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;


这将自动完成设置为从列表内容开始工作.您可能要一直使用AutoCompleteMode,直到它完全满足您的要求为止.


This sets the auto complete to work from the list content. You may want to play with the AutoCompleteMode until it does what you want exactly.


非常感谢OrigianlGriff的回答.我知道如何用您的慷慨回答解决这个问题.谢谢!最后,我在用于ASP.NET的组合框控件中找到了想要的内容[ ^ ]

[edit]不要添加答案来说明!而是编辑您原来的问题,以使所有其他信息都聚集在一起,然后使用接受答案"按钮关闭该问题.这样一来,它就不会挂掉回答问题的系统! OriginalGriff.

P.S.不客气![/edit]


感谢您的提醒.
Thanks a lot for OrigianlGriff''s ans. I know how to solve the question by your generous ans. Thanks! Finally I found what I want at ComboBox Control for ASP.NET[^]

[edit]Don''t add an answer to say that! Edit your original question instead, so that all the info is get together for others, and use the "Accept Answer" button to close the question. That way it doesn''t hang around to clog up the system with answered questions! OriginalGriff.

P.S. You are welcome![/edit]


Thanks for your reminding.


这篇关于有关.net C#帮助中的自定义下拉列表的问题!!!谢谢.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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