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. enter image description here

How can I fix this?

thank

+3


source to share


3 answers


You must set the page size for the grid



DataSource: {data: $ scope.people, pageSize: 10},

+5


source


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


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







All Articles