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,
//...