开发者

Is it Possible to Write in a DropdownList or listbox?

开发者 https://www.devze.com 2022-12-22 00:55 出处:网络
work on Asp.Net C# vs08. I was wondering if it is possible to write in a dropdownlist or listboxsuch that if somebody does not want to select from the dropdownlist or listbox, he/she can type the valu

work on Asp.Net C# vs08. I was wondering if it is possible to write in a dropdownlist or listbox such that if somebody does not want to select from the dropdownlist or listbox, he/she can type the value and if the value exist in the dropdownlist/listbox, it autofills. The person may then select it. If this is not possible in ASP.NET, would anybody know of another control that can be used for the same purpose and how?

what I really need is how to allow the writtin开发者_开发技巧g on the DropDownList, please someone help me!. Thank you very much.


The HTML dropdownlist supports this to a degree. If you tab through a web page until the dropdown gets focus, then type the first character of a valid selection, the first selection in the list starting with the character will appear. If there are multiple items starting with that character, then repeatedly hitting the character will cycle through them. The limitation is that it will only match one character (the last one typed), so that if you type 'john', it will match j, o, h successively, and end up matching n. This is not true autofill.

If you need true autofill, there are several free alternatives, but I use a commercial Third Party control which gives true autofill and also multiple column dropdown capability. Telerik, DevExpress and ComponentArt make controls which do this.


Check out some of the different articles posted about asp.net combobox'es. The best bet might be the combobox from the asp.net ajax toolkit. Otherwise you could look at some other examples here or here.

0

精彩评论

暂无评论...
验证码 换一张
取 消