Datapager in Listview
Hello,
My code is:
if (!IsPostBack)
{
ds = cn.MasterBind("select * from TblEmp");
if (ds.Tables[0].Rows.Count > 0)
{
lstEmp.DataSource = ds.Tables[0];
lstEmp.DataBind();
dp1.Visible = true;
dp1.SetPageProperties(0, dp1.MaximumRows, false);
//ClearState();
}
}
i set datapager setproperties in page load and also i set on search button click event.
dp1.SetPageProperties(0, dp1.MaximumRows, false);
lstEmp.DataSource = dsParent.Tables[0];
lstEmp.DataBind();
But my search result will not display on first index of datapager.On first index my previous data is displayed when i click on 2 page,my search result is displayed.
i also set false to true but it doesn't work.
Do u have any suggestion,pls help me.
Thanks
|