Manoj Chowdary
Manoj Chowdary

Reputation: 97

GridView Not showing list of all page number at bottom in asp.net

I have an ASP.NET GridView control with a massive amount amount of data, which creates page numbers like:

1,2,3,4,5,6,7.....

Instead of periods, I need to show all the page numbers in the GridView at the bottom. Can anyone see what's wrong with my code?

<asp:GridView ID="gvContact" 
              runat="server" 
              AllowPaging="True"
              PageSize="1000" 
              AutoGenerateColumns="False"
              CellPadding="4"
              ForeColor="#333333"
              GridLines="None"
              OnRowCancelingEdit="GridView1RowCancelingEdit"
              OnRowEditing="GridView1RowEditing"
              Width="960px" 
              OnRowUpdating="GridView1RowUpdating"
              OnPageIndexChanging="GrvDetailsPageIndexChanging" 
              OnRowDeleting="GridView1RowDeleting">

Upvotes: 2

Views: 2268

Answers (1)

Aristos
Aristos

Reputation: 66641

Use the PageButtonCount together with the Mode="NumericFirstLast" in the settings of your GridView, for example add this line inside the GridView:

<PagerSettings Mode="NumericFirstLast"  PageButtonCount="1000"  />

Upvotes: 2

Related Questions