0

Here's the mark-up:

<asp:GridView CssClass="gridView" ID="gridview1" runat="server" AutoGenerateColumns="true"
    OnRowDataBound="gridview1_RowDataBound" AllowPaging="True" PageSize="10"
    OnPageIndexChanging="gridview1_PageIndexChanging">
    <HeaderStyle BackColor="#1B58B8" ForeColor="White" />
    <AlternatingRowStyle BackColor="#098ad3" ForeColor="White" />
</asp:GridView>

I don't know why but the other gridView with AllowPaging behaves normally but this one does not. It does not display the page numbers below the gridview. I use .NET Framework 3.5

Jon P
  • 826
  • 1
  • 7
  • 20

2 Answers2

0

First, is the AutoGenerateColumns="true" intentional? It seems you're binding data from code behind.

Second, maybe there is not enough data to display, i.e., below 10.

Rahul
  • 5,603
  • 6
  • 34
  • 57
Ben Gulapa
  • 1,619
  • 14
  • 10
  • `AutoGenerateColumns="true"` is intentional. Meanwhile, there are actually 8k plus rows to display. – Jon P May 29 '13 at 02:10
0

@nathan742 i try your gridview code, and bind on my own data, and it works normally it shows the paging display, how about create on your own paging on databound :

I usually create custom gridview paging like this : Custom Gridview Paging

Sabilv
  • 602
  • 1
  • 15
  • 44
  • Yes, that code works for other pages. The gridview controls as what `PageSize` indicated, in my case `10`, it does that 10 rows per page but the page navigator below does not show up. – Jon P May 29 '13 at 02:28
  • @nathan742 you should refer to this link [link] http://stackoverflow.com/questions/6224998/paging-gridview-problem?rq=1 – Sabilv May 29 '13 at 02:45
  • or check your `CssClass="gridView" ` – Sabilv May 29 '13 at 02:52