I have a GridView control setup like this:
<asp:GridView
ID="UserList"
AllowPaging="True"
PageSize="20"
runat="server">
...
I would like to be able to control the “AllowPaging” parameter of this control in my VB code, but I’m not sure how to add a “Show All” option to the page list at the bottom of the control. This is possible? Am I not thinking about this problem in the right way?
Sure you can. You create a
<PagerTemplate>and include the show all option. In one of our applications, we have aDropDownListwith pages sizes. We capture theOnSelectedIndexChangedevent and set theGridView‘s page size.