View Single Post
  #1 (permalink)  
Old March 10th, 2010, 05:45 AM
monika.vasvani monika.vasvani is offline
Authorized User
Points: 493, Level: 7
Points: 493, Level: 7 Points: 493, Level: 7 Points: 493, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2006
Location: gandhinagar, gujarat, India.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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