I have successfully set up several KendoUI Grids, but I cannot get one using server-side paging to work. I modified my rest service so I will return a total value (hard coded right now).
Below please find the JSON that is put out and the javascript. Any help would be greatly appreciated.
$(document).ready(function(){ // Setup Rest Service var loc = ( location.href ); var url = loc.substring( 0, loc.lastIndexOf( "/" ) ) + "/xpRest.xsp/test/"; dataSource = new kendo.data.DataSource({ pageSize: 20, serverPaging: true, serverFiltering: true, serverSorting: true, transport : { read : { url : url + "READ", dataType : "json" }, type : "READ" }, schema : { total: "total", model : { id : "unid", fields : { unid : { type : "string", nullable : false }, tckNbr : { type : "string", editable : false }, tckSts : { type : "string", editable : false } } } } }); grid = $("#grid-databound-dataItem").kendoGrid({ dataSource : dataSource, height: 550, filterable: true, sortable: true, pageable: true, columns : [ {field : "tckNbr", title : "Number", type: "string"}, {field : "tckSts", title : "Status", type: "string"} ] }).data("kendoGrid"); });
[ { "total":100, "data": [ { "tckNbr":"3031", "tckSts":"1 Not Assigned", "unid":"0014DA9095BF6D638625810700597A36", "tckReqs":"Bryan S Schmiedeler", "tckNts": [ "Bryan DeBaun" ], "tckBUs": [ "NAP\/IFI" ], "tckApps":"GTM", "tckType":"Issue", "tckPriority":"Medium" }, { "tckNbr":"3031", "tckSts":"1 Not Assigned", "unid":"00598976D88226D2862581070059AD25", "tckReqs":"Bryan S Schmiedeler", "tckNts": [ "Bryan DeBaun" ], "tckBUs": [ "NAP\/IFI" ], "tckApps":"GTM", "tckType":"Issue", "tckPriority":"Medium" } ] }]