如何将@ html.dropdownlistfor转换为自动完成下拉列表 [英] How do I convert @html.dropdownlistfor to an autocomplete dropdownlist
本文介绍了如何将@ html.dropdownlistfor转换为自动完成下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在尝试更新我的代码以更改以下代码行
I am currently trying to update my code to change the following code line
@Html.DropDownListFor(m => m.Branch, new List<SelectListItem> { new SelectListItem { Text = null, Value = null } },
我需要将此更改为自动完成下拉列表,
我尝试过的内容:
将代码转换为jquery自动完成问题是我将我的数据从biztalk调用检索到列表中,在此选项可用之前,它通过搜索来自另一个字段
I need to change this to be a autocomplete dropdownlist,
What I have tried:
Converting code to jquery auto complete issue is i am retrieving my data from a biztalk call into a list and before this option is available it is filtered by a search from another field
推荐答案
DropDownList可能不适合你。忘了DropDownList。你需要一个jQuery插件。找到这里或制作自己的概念是..
>将您的数据绑定到单独的div。
>将它们全部隐藏起来。
>放一个文本框并在该文本框的关键事件中显示过滤后的数据(div)。
"DropDownList" may not work for you. Forget about "DropDownList". You will need here a jQuery plugin. find Here or make your own. concept is..
> bind your data to separate divs.
> hide them all.
> put a textbox and on that textbox's key event show filtered data(divs).
这篇关于如何将@ html.dropdownlistfor转换为自动完成下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文