There doest not seem to be an event associated with page change. Is there any way I can figure out if a page change has occurred with information such as current page etc ?
dataBound is fired after the page changes right? I know there is a new dataBinding, I assume the first too. With remote/ajax datasource, does dataBinding fire before the ajax query, or after but before the result is applied to the datasource object?
Bottom line, I want to know when the user said to change the page, but before any of the existing data is destroyed. Basically, I wan't to autoSave and dirty rows in an editable grid when the user pages.
thanks.
Alexander Valchev
Telerik team
commented on 25 Feb 2015, 11:12 AM
Hello Bob,
There are two different events - DataBound and DataBinding. The first one fires after the Ajax data is received and after the Grid rows are rendered in the DOM. The second one fires after the Ajax data is received but before Grid rows are rendered.
DataBound will fire after the page changes. DataBinding will fire before the page changes.
Bottom line, I want to know when the user said to change the page, but before any of the existing data is destroyed.
You need the dataBinding event.
Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
There's a secret "undocumented" feature of the kendo grid, that is:
$('#grid').kendoGrid({
pageable: {
pageSize: 2, change: function(e){alert('pager change event');} }
The "change" event of the pageable property is not in the grid documentation, but it works!