开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜