开发者

ObjectDataSource: needs to 'show all records' on demand instead of paging

开发者 https://www.devze.com 2023-03-05 05:51 出处:网络
I have a GridView and ObjectDataSource set up to do custom paging and everything was fine. Now the client wants a \'show all\' button. In the event handler for this button, what can I 开发者_运维知识库

I have a GridView and ObjectDataSource set up to do custom paging and everything was fine. Now the client wants a 'show all' button. In the event handler for this button, what can I 开发者_运维知识库do to achieve this?

Thanks for your time.


If you want show all records on a button click, then its better to set AllowPaging = false on the button's Click handler. It will simply disable the paging feature and bind all the records to the gridview:

Gridview1.AllowPaging = false;
Gridview1.DataBind();
0

精彩评论

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

关注公众号