开发者

use nhibernate pagination with the gridview control of asp .net

开发者 https://www.devze.com 2023-03-13 21:24 出处:网络
I use nhibernate 3.1 and I\'d like to use the gridview control (in ASP.Net 4) At the moment, I use the classic gridview.DataSource = xxx and gridview开发者_C百科.DataBind() to show the data but I\'d

I use nhibernate 3.1 and I'd like to use the gridview control (in ASP.Net 4)

At the moment, I use the classic gridview.DataSource = xxx and gridview开发者_C百科.DataBind() to show the data but I'd like to paginate the gridview. I know how to do it .. but if I've 10k rows, it will retrieve the 10k rows ...

Is it possible to use pagination with nhibernate without retrieving the whole data (and increase the size of the viewstate ?).

Regards


To achieve this efficiently you could implement a custom paging. Here's an article on MSDN which illustrates the usage of an ObjectDataSource.

0

精彩评论

暂无评论...
验证码 换一张
取 消