You can use the PagerTempate-property:
<asp:GridView Id="MyGridView" runat="server" AllowPaging="true">
<PagerTemplate>
<asp:LinkButton CommandName="Page" CommandArgument="First" ID="lbFirst" runat="server">First</asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Prev" ID="lbPrev" runat="server"><</asp:LinkButton>
[Items <%= MyGridView.PageIndex * MyGridView.PageSize %> - <%= MyGridView.PageIndex * MyGridView.PageSize + MyGridView.PageSize - 1 %>]
<asp:LinkButton CommandName="Page" CommandArgument="Next" ID="lbNext" runat="server">></asp:LinkButton>
<asp:LinkButton CommandName="Page" CommandArgument="Last" ID="lbLast" runat="server">>></asp:LinkButton>
</PagerTemplate>
...
You can also make your custom Griview which inherites from the standard Griview. Then you can override the InitializePager
-method:
protected override void InitializePager(GridViewRow row, int columnSpan, PagedDataSource pagedDataSource)
{
TableCell pagerCell = new TableCell();
pagerCell.ColumnSpan = columnSpan;
LinkButton linkFirst = new LinkButton();
linkFirst.ToolTip = "Go to first page";
linkFirst.CommandName = "Page";
linkFirst.CommandArgument = "First";
pagerCell.Controls.Add(linkFirst);
row.Cells.Add(pagerCell);
}
I've just pasted some bits of my code together here, so I don't know if this code snippet works but it should give you a good indication of how you can override the InitializePager
-method! :-)