Kendo Mobile ListView not paging

865 views Asked by At

I'm using Kendo Mobile ListView, and I have problem with pagination, first page is displayed but after that my ListView seems stuck, i.e. loader appears, but no data is added to my list, also I can see in my debugger that data was pulled from the server. Here is my code:

m_userRoutines: new kendo.data.DataSource({
        serverFiltering: false,
        serverPaging: true,
        pageSize: 20,
        transport: {
            read: {
                url: pub.serverUrl + "api/Statistics/GetAllRoutinesUserHasDone",
                beforeSend: function (req) {
                    //radi uz data type json
                    req.setRequestHeader("Authorization", "Bearer " + app.loginToken);
                },
                dataType: "json"
            }
        },
        requestEnd: function (e) {
            console.log("user routines loaded", e.response);
        },
        schema: {
            data: function (data) {
                return data;
            },
            total: function (data) {

                return m_userWorkouts.get("workoutsCount");
            }
        }
    }),
1

There are 1 answers

0
hyperN On BEST ANSWER

I believe I found answer, according to Kendo Mobile documentation:

In order for the scrolling to occur smoothly, the page size should not be too low. For example, if 5 items are visible on the page, at least 15 physical DOM elements are needed, which means that the DataSource page size should be 30 or greater.

Problem with my page size is that it was too low, when I set my pageSize to 60 everything worked fine :)