简体   繁体   English

ASP.Net MVC页的增量组合框/文本框?

[英]Incremental combo box/text box for ASP.Net MVC page?

I have a large list of items to be placed in a dropdownlist (>1000) and am trying to figure out a way to create some sort of incremental selectlist or dropdownlist that makes json callbacks to the data source so that the page loads quicker. 我将大量项目放置在下拉列表(> 1000)中,并试图找到一种创建某种增量选择列表或下拉列表的方法,该选择列表或下拉列表使json回调到数据源,以便页面加载更快。

I assume that I would use a combo box but i am not sure how to not load the full data set when the page builds. 我假设我会使用组合框,但是我不确定在页面构建时如何不加载完整的数据集。

I'm thinking that using the autocomplete Jquery plugin might be part of the solution. 我在想使用自动完成的Jquery插件可能是解决方案的一部分。 There is also the fact that I will be loading an existing record into the form that may already ahve a selected item that is in the DDL. 还有一个事实是,我将现有记录加载到可能已经具有DDL中所选项目的表单中。

Any tutorials/examples that anyone is aware of? 任何人都知道的任何教程/示例吗?

I would definetly use an autocomplete like typeahead , that would be faster and easier for your user. 我肯定会使用像typeahead这样的自动完成功能,这对于您的用户来说会更快,更容易。

If not then you will need to do a SetInterval to do a call to an ajax method that will return 20 results and add it to the ddl. 如果不是,那么您将需要执行SetInterval来调用ajax方法,该方法将返回20个结果并将其添加到ddl中。

Let me know where you need more help and show us what you got so far and I'll do my best to help you. 让我知道您在哪里需要更多帮助,并向我们展示您到目前为止所获得的帮助,我会尽力为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM