开发者

use nhibernate pagination with the gridview control of asp .net

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜