I am experiencing strange behavior when using NeedDataSource and paging. Basically, I have a search button on my page and when the user searches more than once, it will return page index 0 the first time, 1 the second time, and so on. I could easily just set the CurrentPageIndex property everytime a search takes place, but I want to make sure this is expected behavior from telerik.
protected void Page_Init(object sender, EventArgs e) |
{ |
if (Page.IsPostBack) |
{ |
grdUsers.NeedDataSource += new GridNeedDataSourceEventHandler(grdUsers_NeedDataSource); |
} |
} |
protected void btnSearch_Click(object sender, EventArgs e) |
{ |
grdUsers.Rebind(); |
} |
protected void grdUsers_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
{ |
grdUsers.DataSource = GetUsers(); |
} |