16

How can I set maximum number of rows per page to 5? Default is 10.

<SettingsPager PageSize="5"> 

... doesnt work

thanks for help

slugster
  • 49,403
  • 14
  • 95
  • 145
gruber
  • 28,739
  • 35
  • 124
  • 216

6 Answers6

14

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

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

 </asp:GridView>  
anishMarokey
  • 11,279
  • 2
  • 34
  • 47
13
<dx:ASPxGridView ...  SettingsPager-PageSize="20">
Ahmet
  • 131
  • 1
  • 3
7

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.

DOOMDUDEMX
  • 644
  • 1
  • 8
  • 24
DevExpress Team
  • 11,338
  • 2
  • 24
  • 23
3

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; 
Rae Lee
  • 1,321
  • 10
  • 11
1

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.

LPK
  • 81
  • 1
  • 8
1

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

gruber
  • 28,739
  • 35
  • 124
  • 216
  • I recommend contacting the DevExpress support team:http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question – Mehul Sep 09 '10 at 04:22