Skip to content

Paging style in gridview

kavita

Asked Jul 19, 2007, 2:43 AM EDT2 answers
Share
LinkedInX
hi this is kavita I m using gridview and use paging their are 4 mode of paging style in asp.net2.0.I want like google type of paging like 1 2 3 4 5 6...Next Last can any body help me to customize it? thanks

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    i believe that the grid will display the numbers if you implement it like this

    <form runat="server" method="post">
     <asp:DataGrid runat="server" id="myDataGrid"
       Border="0"
       Cellpadding="4"
       Cellspacing="0"
       AlternatingItemStyle-BackColor="#EFEFEF"
       ShowHeader="True"
       CssClass="DataGrid"
       HeaderStyle-BackColor="Black"
       HeaderStyle-ForeColor="White"
       HeaderStyle-Font-Bold="True"
       AllowPaging="True"
       PageSize="10"
       PagerStyle-Mode="NextPrev"
       PagerStyle-NextPageText="Next ->"
       PagerStyle-PrevPageText="<- Previous"
       PagerStyle-Font-Bold="True"
       OnPageIndexChanged="myDataGrid_PageChanger"
     />
    </form>

    after, the number appear as you add more records to the grid
    0
  • 0
    thanks velkropie but It not work What I want. I want pager look like "First previous 1 2 3 4 5 6 7 8 9 10 Next Last" please help.
    0