嗨,Datatable绑定到Gridview [英] Hi, Binding of Datatable to Gridview
本文介绍了嗨,Datatable绑定到Gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我将数据表绑定到gridview时,10000条记录需要超过5分钟但是2秒内执行选择查询并在2秒内检索记录。我应该怎么做才能减少时间
Hi, When i m bind a datatable to gridview it will take more than 5 mins for 10000 records but the select query executed in 2 seconds and retrieve records in 2 seconds.what should i do for reduce the time
推荐答案
简单。不要试图将10,000条记录绑定到该死的网格上!
老实说,谁在他们正确的思想中想要同时查看10,000条记录?
使用虚拟模式 [ ^ ]在网格属性中实现分页,其中只将数据绑定到用户实际可以看到的网格。
Easy. Don't try to bind 10,000 records to the damn grid!
Honestly, who in their right mind would want to look at 10,000 records all at once?
Use Virtual mode[^] in the grid properties and implement paging where you only bind the data to the grid that the user can actually see.
这篇关于嗨,Datatable绑定到Gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文