数据绑定到Gridview 1条记录1条记录 [英] Data Binding to Gridview 1 record by 1 record

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

问题描述

我有一个问题,它绑定大量数据,客户希望数据按1显示1.这意味着,如果我在数据集中有100000条记录,并且如果我绑定到datagridview,它需要等待很长时间才能显示出来.我需要问的是,是否有可能使数据显示为1比1?这意味着当它有10000条记录时,当第1条记录绑定到时,网格将显示1条记录,第2条记录绑定到时,网格将再添加1条记录,依此类推.而不是等到10000条记录中的所有绑定才显示结果.

i have a question which binding a huge set of data, and the client wish the data display out 1 by 1. Which means, if i have 100000 records in the dataset, and if i bind to the datagridview, it need to wait long time to display out. What I need to ask is, is it possible to make the data display 1 by 1? It means when it have 10000 records, when 1st record bind in, the grid will display 1 record, 2nd record bind in, grid will add 1 more record, and so on. Instead of wait until 10000 records all binding in only display out the result. is it possible ?

推荐答案

使用分页,请参见此处:

DataGrid分页-C#Windows窗体 [ http://www.developerfusion.com/article/5292/datagridgridview -paging-and-sorting-using-a-datareader/ [ http://msdn.microsoft.com/en-us/library/aa713421%28v = vs.71%29.aspx [ ^ ]
Use paging, see here :

DataGrid Paging - C# Windows Forms[^]

http://www.developerfusion.com/article/5292/datagridgridview-paging-and-sorting-using-a-datareader/[^]

http://msdn.microsoft.com/en-us/library/aa713421%28v=vs.71%29.aspx[^]


这篇关于数据绑定到Gridview 1条记录1条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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