gruber
gruber

Reputation: 29729

ASPxGridView rows per page

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

Answers (6)

Rae Lee
Rae Lee

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

LPK
LPK

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

DevExpress Team
DevExpress Team

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

Ahmet
Ahmet

Reputation: 131

<dx:ASPxGridView ...  SettingsPager-PageSize="20">

Upvotes: 13

gruber
gruber

Reputation: 29729

It works for me only when I set it programmaticaly in codeBehind on PageLoad.

Upvotes: 1

anishMarokey
anishMarokey

Reputation: 11397

Set GridView.PageSize Property to "5" Try this:

<asp:GridView ID="GridView2" runat="server"  PageSize="5">

 </asp:GridView>  

Upvotes: 14

Related Questions