This question is locked. New answers and comments are not allowed.
There seems to be a bug in the grid when the Ajax dataBinding event is cancelled when going to another page. Internally the grid has gone to the new page but when the ajax call to get the new page data is cancelled with e.preventDefault internally the grid won't go back to the old page.
Example of this bug can been seen in the Batch Editting demo when the following is done:
1. Start demo
2. Check a value in the grid
3. Use pager to go to page 2
4. Cancel the dialog about lost changes (grid stays on page 1)
5. Hit Refresh icon
6. OK the dialog about lost changes and...
Presto: page 2 is shown.
problem is line 2 in de pageTo function of the grid (line 976 of telerik.grid.js (Q2-2011).
In the line this.currentPage is always set to new page number. So even when dataBinding is cancelled (or goes wrong for whateven reason) the currentPage has the value of the new page.
Kind regards,
Niels Schneider
Example of this bug can been seen in the Batch Editting demo when the following is done:
1. Start demo
2. Check a value in the grid
3. Use pager to go to page 2
4. Cancel the dialog about lost changes (grid stays on page 1)
5. Hit Refresh icon
6. OK the dialog about lost changes and...
Presto: page 2 is shown.
problem is line 2 in de pageTo function of the grid (line 976 of telerik.grid.js (Q2-2011).
pageTo:
function
(page) {
this
._pagingInProgress =
true
;
this
.currentPage = page;
if
(
this
.isAjax())
this
.ajaxRequest();
else
this
.serverRequest();
},
In the line this.currentPage is always set to new page number. So even when dataBinding is cancelled (or goes wrong for whateven reason) the currentPage has the value of the new page.
Kind regards,
Niels Schneider