Hi,
I am creating a kendo grid and trying to get paging working. I have updated the dataSource schema so that total is set and I can see from the console.log output that it returns a value but I still get the message "No items to display" and the paging doesnt work. Below is the the kendo grid code and a sample of the json returned. Can anyone see what I am doing wrong?
$("#requestBreakdown").kendoGrid({
dataSource: {
type: "json",
transport: {
read: "/home/Grid_DataSource?startDate=01/05/2016&endDate=12/05/2016",
dataType: "json"
},
pageSize: 2,
serverPaging: false,
schema: {
data: "Data",
total: function (data) {
console.log(data.Total);
return data.Total;
},
}
},
groupable: false,
sortable: true,
pageable: true,
columns: [
{ field: "TITLE", title: "Title" },
]
});
JSON response
{"Data":[
{"WORKORDERID":1,"TITLE":"First"},
{"WORKORDERID":2,"TITLE":"Second"},
{"WORKORDERID":3,"TITLE":"Third"}
//ADDITIONAL ITEMS REMOVED
],"Total":124}