I am trying to implement serverPaging sorting by using Webapi.
I use angularjs in UI side.
i have implemented server side code. which accept kendoRequest and returns kendoResponse.
it returns data as well.
but grid trying to load it throughs undefined is not a function, i have attached screenshot of error.
here is my code
$scope.mainGridOptions = {
columns:["Country","RiskReference"],
dataSource: new kendo.data.DataSource({
transport: {
read: {
url: serviceBase + "api/Policy/GetPolicyPage/" + $scope.policyId,
type: "POST",
contentType: "application/json"
},
parameterMap: function (options, operation) {
if (operation === "read") {
return kendo.stringify(options);
}
return options;
}
},
pageSize: 10,
serverPaging: true,
serverSorting: true
}),
sortable: true,
pageable: true,
resizable: true,
selectable: "single cell",
editable: "popup",
schema: {
data:"Data",
total: "Count"
},error: function (e) {
console.log(e.statusText);
}
};
See attached file for data format return from my webapi service.
please review my code, is there anything am i missing?
regards,
Saad
I use angularjs in UI side.
i have implemented server side code. which accept kendoRequest and returns kendoResponse.
it returns data as well.
but grid trying to load it throughs undefined is not a function, i have attached screenshot of error.
here is my code
$scope.mainGridOptions = {
columns:["Country","RiskReference"],
dataSource: new kendo.data.DataSource({
transport: {
read: {
url: serviceBase + "api/Policy/GetPolicyPage/" + $scope.policyId,
type: "POST",
contentType: "application/json"
},
parameterMap: function (options, operation) {
if (operation === "read") {
return kendo.stringify(options);
}
return options;
}
},
pageSize: 10,
serverPaging: true,
serverSorting: true
}),
sortable: true,
pageable: true,
resizable: true,
selectable: "single cell",
editable: "popup",
schema: {
data:"Data",
total: "Count"
},error: function (e) {
console.log(e.statusText);
}
};
See attached file for data format return from my webapi service.
please review my code, is there anything am i missing?
regards,
Saad