Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
42
rated 0 times [  47] [ 5]  / answers: 1 / hits: 17428  / 11 Years ago, mon, december 2, 2013, 12:00:00

I have a kendo grid with pageable true. I want to trigger a custom function with Next page in kendo grid paging is getting clicked?


More From » jquery

 Answers
62

You will need to trigger a callback in the change event of the datasource bound to the grid.




Fired when the data source is populated from a JavaScript array or a
remote service, a data item is inserted, updated or removed, the data
items are paged, sorted, filtered or grouped.




Datasource Change Event



JS CODE



Subscribe to change on initialisation



var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: http://demos.kendoui.com/service/products,
dataType: jsonp //jsonp is required for cross-domain requests; use json for same-domain requests
}
},
change: function(e) {
// PLACE YOUR CALLBACK CODE HERE
}
});
dataSource.fetch();


Subscribe to change post initialisation



function callback(e) {
// PLACE CALLBACK CODE HERE
}
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: http://demos.kendoui.com/service/products,
dataType: jsonp //jsonp is required for cross-domain requests; use json for same-domain requests
}
}
});
dataSource.bind(change, callback);
dataSource.fetch();

[#73950] Saturday, November 30, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
daquanmilesw

Total Points: 57
Total Questions: 102
Total Answers: 110

Location: Wallis and Futuna
Member since Sat, Aug 6, 2022
2 Years ago
daquanmilesw questions
;