您的位置:首页 > 产品设计 > UI/UE

KendoUI之kendoGrid服务端分页

2015-08-26 19:34 459 查看
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,
//...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: