Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Paging in the GridView

Status
Not open for further replies.

tshad

Programmer
Jul 15, 2004
386
US
I am trying to do custom paging in the gridview as I really don't like how the control does it automatically.

I only want "Next" and "Last" and no page numbers as there are only going to be a couple of pages showing.

I am using the PagerTemplate.

Code:
<PagerTemplate>
    <table>
        <tr>
            <td>
                <asp:PlaceHolder ID="ph" runat="server"></asp:PlaceHolder>
            </td>
        </tr>
    </table>
</PagerTemplate>

I then create the linkbuttons on the fly and it all word fine. But the Grid automatically puts the page numbers in as well.

Is there a way to hide the numbers so I only get:

<Next Previous>

Thanks,

Tom
 
I found it.

The code I was using was manually creating the Page numbers based on the number of pages in the GridView.

I only had to comment out that code and now I have the Prev and Next left over doing what they already did.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top