This is the default behavior because it allows features like custom paging to work.
Here is an example based on this demo:
1) Enable custom paging.
2) Click on second page.
3) On NeedDataSource event perform request to your DataObject and return some records.
4) Set these new records as a DataSource of your grid.
Now if on step 4 you reset the paging index (because of datasource changing) then the paging index will be zero. Which is wrong - it should be one.
It is pretty much the same situation with FilterExpression an the other settings.
Hi ..
If I go to page 3 and then bind a new datasourcr(table) I will end up with the grid showing page 3 ... how to prevent this? I tried setting CurrentPageIndex to 0 and it seemt o work. Don't really understand ..
//h
0
Vasil
Telerik team
answered on 03 Jan 2011, 04:33 PM
Hello Henrik,
Yes, this is the right approach. If you want to reset the CurrentPageIndex when binding to new datasource, then set yourGrid.CurrentPageindex=0;