Hi,
I use the KendoGrid to display some data returned by a MVC3 crontroller.
Data are successfully displayed, but the kendoGrid's pager display "Page 0 of NaN"
Here is my JS:
var sectionId = $("#myKendoCombobox").val();
$("#myKendoDiv").kendoGrid({
scrollable: true,
sortable: true,
pageable: true,
selecteable: false,
filterable: true,
dataSource: {
transport: {
read: {
url: _pathRoot + "GetDataById",
data: { sectionId: sectionId },
dataType: "json",
type: "GET",
contentType: "application/json; charset=utf-8"
}
},
schema: {
data: "data",
total: "total"
},
pageSize: 1,
},
pageable: {
refresh: true,
input: true,
numeric: false
},
columns: [ ... ]
});
I tried to use un function for the "total" parameter, like this : total: function (response) {
alert(response.total);
return response.total;
}
And the message box successfully display my number of items, so it's not a problem of proprty name.
Could you help me to fix that problem ?
Thanks in advance.
I use the KendoGrid to display some data returned by a MVC3 crontroller.
Data are successfully displayed, but the kendoGrid's pager display "Page 0 of NaN"
Here is my JS:
var sectionId = $("#myKendoCombobox").val();
$("#myKendoDiv").kendoGrid({
scrollable: true,
sortable: true,
pageable: true,
selecteable: false,
filterable: true,
dataSource: {
transport: {
read: {
url: _pathRoot + "GetDataById",
data: { sectionId: sectionId },
dataType: "json",
type: "GET",
contentType: "application/json; charset=utf-8"
}
},
schema: {
data: "data",
total: "total"
},
pageSize: 1,
},
pageable: {
refresh: true,
input: true,
numeric: false
},
columns: [ ... ]
});
I tried to use un function for the "total" parameter, like this : total: function (response) {
alert(response.total);
return response.total;
}
And the message box successfully display my number of items, so it's not a problem of proprty name.
Could you help me to fix that problem ?
Thanks in advance.