Rajbir Singh
Rajbir Singh

Reputation: 1691

GridView Custom Paging - First, Last, Next, Previous,Numeric

I am using a sql store procedure for custom paging.

Now i want to make a custom pager for gridview.

I have searched on google and find various articles about it.

But i am not getting which i want.

please help me for it if you have any idea about it.

Thanks, Rajbir

Upvotes: 1

Views: 2328

Answers (2)

huMpty duMpty
huMpty duMpty

Reputation: 14470

I think you looking for something like this

<ItemTemplate>
    <asp:LinkButton ID="lnkPage" runat="server" Text = '<%#Eval("Text") %>' CommandArgument = '<%# Eval("Value") %>' Enabled = '<%# Eval("Enabled") %>' OnClick = "Page_Changed"></asp:LinkButton>
</ItemTemplate>

You will find more form Custom Paging in ASP.Net GridView using SQL Server Stored Procedure

Upvotes: 3

Ashwini Verma
Ashwini Verma

Reputation: 7525

there is nothing to do with Stored Procedure to use Paging in Gridview. Only you need to do is to bind your GridView on OnPageIndexChanging event.

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{            
  GridView1.PageIndex = e.NewPageIndex;                     
}

Please visit this link for example: ASP.NET GridView with Custom Paging UI

Upvotes: 0

Related Questions