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;
}
0 comments:
Post a Comment