Kendo grid paging not initialized properly (NaN - NaN)
Here is an example execution http://dojo.telerik.com/exok/12
It is basically a Kendo grid with Angular. Datasource as ObservableArray (this works better than just DataSource). The problem is that the current page is not set and the footer displays NaN - NaN of 3 elements.
How can I fix this?
thank
+3
source to share
3 answers
I ended up using DataSource. ObservableArray does not have a pageSize property, and the escaping related object does not pass the pageSize to the grid. This answer helped me Change Angular Model to Kendo Update
+2
source to share
you should return the total number of records from the server:
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "..."
}
},
schema: {
total: function(response){ return response.total;}
},
pageSize: 5,
serverPaging: true,
serverSorting: true
};
$("#grid").kendoGrid({
datasource: dataSource,
pageSize: true,
});
0
source to share