Gridview paging in asp.net c#

In this article, I will explain how to bind the page index in gridview in asp.net C#. For implementing the PageIndex we fellow the bellows steps:-
Source Code:-

For the paging we need AllowPaging =”true” and            onpageindexchanging="gdemp_PageIndexChanging" and PageSize=”5”




<asp:GridView ID="gdemp" runat="server" AllowPaging="true" PageSize="5"
            onpageindexchanging="gdemp_PageIndexChanging">
        </asp:GridView>


Implementing Paging in GridView
protected void gdemp_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gdemp.PageIndex = e.NewPageIndex;
        gdemp.DataBind();
    }
 




Note :- I have already bind this girdview with xml .In this article I have shown Paging in GridView
Gridview paging in asp.net c# Gridview paging in asp.net c# Reviewed by NEERAJ SRIVASTAVA on 6:43:00 PM Rating: 5

No comments:

Powered by Blogger.