Aspx Page
aspx.cs Code behind ,OnInit ,we bind the data for paging
protected override void OnInit(EventArgs e)
{
if (Session["dsreport"] != null)
{
if (!(Request.Params.GetValues(0)[0].EndsWith(butFilter.ID) || Request.Params.GetValues(0)[0].EndsWith(butReset.ID) || Request.Params.GetValues(0)[0].EndsWith(ddlPageSize.ID)))
{
gridCustomer.DataMember = "Table";
gridCustomer.Bands[0].DataMember = "Table1";
gridCustomer.DataSource = (DataSet)Session["dsreport"];
gridCustomer.DataBind();
}
gridCustomer.Bands[0].Columns["BRHE_ID"].Hidden = false;
}
else { }
base.OnInit(e);
}
Also in Posback,the below code is written
if (Session["dsreport"] != null)
{
gridCustomer.Behaviors.Paging.PageIndex = 0;
gridCustomer.Behaviors.Paging.PageSize = Convert.ToInt32(hidPageSize.Value);
gridCustomer.Bands[0].Behaviors.Paging.PageSize = 10;
gridCustomer.Behaviors.Paging.Enabled = true;
gridCustomer.DataMember = "Table";
gridCustomer.Bands[0].DataMember = "Table1";
gridCustomer.DataSource = (DataSet)Session["dsreport"];
gridCustomer.DataBind();
gridCustomer.RefreshBehaviors();
// gridCustomer.DataBind();
//upd.Update();
}