gridview海量数据 [英] gridview large amount of data

查看:76
本文介绍了gridview海量数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在GRIDVIEW控件中显示数据时遇到问题,我在Gridview中显示了2条lac记录(使用代码进行分页),但是当我触发查询以显示数据时,仅显示40-5万(不精确)记录,我使用Session来存储数据表,该会话用于gridview的数据源.

请帮助我解决此问题.

Hi,

I have a problem to show data in GRIDVIEW control, I have 2 lac records to display in gridview(with paging using code) but when I fired query to show data, there is shows only 40-50 thousands(not exact) of records, And I used Session to store datatable this session is used to datasource of gridview.

Please help me to sort out this problem.

推荐答案

您可以按需获取数据.即时获取分页数据.您可以使用AJAX/XMLHttpRequest从服务器获取数据.可用的jQuery插件之一:
MSDN:使用jQuery DataTables插件对OData进行切片和切块 [ jQuery DataTables [ ^ ]


此外,我不建议您将数据存储在会话中.拥有如此多的记录,您只是在给Web服务器施加很多内存压力.按需获取数据或存储在缓存中.
You can fetch the data on-demand. Get data on pagination on the fly. You can use AJAX/XMLHttpRequest to get data from server. One of the jQuery plugin available:
MSDN: Slice and Dice OData with the jQuery DataTables Plug-In[^]
jQuery DataTables[^]


Further, I would not suggest you to store the data in Session. With so many number of records, you are just putting lots of memory pressure on webserver. Fetch data on demand or store in cache.


这篇关于gridview海量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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