在Combobox中加载数据时出现问题 [英] Problem in loading Data in Combobox

查看:84
本文介绍了在Combobox中加载数据时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的页面上有一个组合框.将选择超过2万条记录并将其加载到此组合框中.单击此组合框时,显示内容的速度非常慢,并且需要花费更多时间进行响应.我如何避免这种情况.

谢谢,
Velkumar.

Hi,

I have a combobox in my page . More than 20 thousand records will be selected and loaded into this combobox. While clicking this combobbox it''s very slow to display the contents and takes more time to respond. How can i avoid this situation.

Thanks,
Velkumar.

推荐答案

1)限制组合框中显示的元素数,否则,如果用户必须浏览所有内容,则会破坏控件的可用性数据以获取所需的物品.为了限制数据,您可以尝试一次加载5个或10个项目,并且当用户滚动到最后一个项目时,可以加载下一个项目.不确定如何操作,但绝对值得探索.

2)考虑重新设计您的应用程序,因此可以使用带有分页的GridView而不是组合框.

3)智能地使用UpdatePanel可以确保不会总是重新发布海量数据,因此不会使视图状态膨胀,从而减小了页面大小和要呈现的HTML数量,因此变得更快. />
希望对您有所帮助.
1) Limit the number of elements shown in the combo box, otherwise it would defeat the usability of the control if the user has to browse through all that data to get to the item they want. For limiting data, you can try loading 5 items or 10 items at a time and when the user scrolls past the last one, you load the next set. Not sure how to do it, but definitely worth exploring.

2) Consider redesigning your app so instead of using a combo box perhaps use a GridView with paging.

3) Using UpdatePanel intelligently would make sure that this massive data doesn''t always get reposted and hence doesn''t bloat the view-state and therefore reduces the page size and the amount of HTML to render and hence becomes faster.

hope this helps.


为什么要在组合框中显示20000条记录?您认为用户将向下滚动并检查20000条记录以选择一条记录吗?

尝试其他类似分页的自动完成文本框或gridview.

在组合框中加载20k条记录是一个非常糟糕的主意.即使我们进行了一些更改,性能仍然始终是一个问题.
Why do you want to display 20000 records in Combobox?? Do you think user will be scrolling down and check 20000 records to select one record?

Try something else like autocomplete textbox or gridview with paging.

its very bad idea to load 20k records in a combobox.. Even if we make some changes still the performance will be an issue here always




您可以在页面中添加自定义控件.该自定义控件应具有以下功能,

1)分页10/20个记录页面.
2)页面应在下一页/上一页/第一页/最后一页/转到中导航.
3)您需要在自定义组合框中搜索.

此处 [
Hi,

You can add your custom control in your page. That custom control should have features like,

1) Paging for 10/20 records a page.
2) page should be navigate through Next/Previous/First/Last/Goto.
3) You need Searching in your custom Combobox.

Here[^] some basic idea about Custom control.

Hope this helps you

Thanks
-Amit Gajjar


这篇关于在Combobox中加载数据时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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