Subscribe Now!

Enter your email address:

Friday, October 22, 2010

Pagging In asp.net c#

How To Use Pagging In asp.net c#

In ASPX Page:
                                        PageSize="5" AutoGenerateColumns="false" EmptyDataText="No Result Found" Width="100%"
                                        OnRowCommand="gvVendor_RowCommand" OnSorting="grdView_OnSorting" OnRowDataBound="gvResults_RowDataBound"
                                        CellPadding="4" AllowPaging="true" OnPageIndexChanging="gridView_PageIndexChanging">


Incode Behind :

protected void gridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gvVendor.PageIndex = e.NewPageIndex;
        gvVendor.DataSource = Binddata();
        gvVendor.DataBind();
        gvVendor.PageSize = 10;
    }


Pagging In asp.net c#

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...