Reputation: 29729
How can I set maximum number of rows per page to 5? Default is 10.
<SettingsPager PageSize="5">
... doesnt work
thanks for help
Upvotes: 16
Views: 45115
Reputation: 1391
I set Number of rows per page to 50 but by Default its 10.
On client side use this
<asp:GridView ID="GridView1" runat="server">
<SettingsPager PageSize="50">
</SettingsPager>
</asp:GridView>
On server side use
SettingsPager.PageSize=50;
Upvotes: 3
Reputation: 89
Please check if you have any skin set for the grid view or any other user control attached to the grid view.I faced the same issue due to the custom export control bind to the grid view.
Upvotes: 1
Reputation: 11376
The problem might appear because you are loading ASPxGridView
settings from cookies or any other storage where they were saved. Am I right? If so, you should either delete a cookie or set the SettingsPager.PageSize
within the Page_LoadComplete
method.
Upvotes: 7
Reputation: 29729
It works for me only when I set it programmaticaly in codeBehind on PageLoad.
Upvotes: 1
Reputation: 11397
Set GridView.PageSize Property to "5" Try this:
<asp:GridView ID="GridView2" runat="server" PageSize="5">
</asp:GridView>
Upvotes: 14