parameterMap:設定傳遞給服務器的當前頁數與每頁大小,django下用get方法有效,post方法無法取得這2個參數
shema.total:設定總行數
serverPaging: true //設定服務器來實現分頁功能
var ds = new kendo.data.DataSource ({ transport: { read: { url: 'xxx', type: 'GET', //X GET dataType: 'json', contentType: 'application/json; charset=utf-8', } ,parameterMap: function (options, operation) { //X if (operation == "read") { return {page:options.page,pageSize:options.pageSize}; } } } ,schema: { total : function(d) { return {{task_counts}}; //return 100000000000; //總條數 } } ,batch: true //X ,pageSize: 15 //X ,serverPaging: true //X }); window.dataBindingLoaded = false; $("#grid").kendoGrid({ dataSource: ds,
//...