This is a migrated thread and some comments may be shown as answers.

ListView + Pager

1 Answer 451 Views
This is a migrated thread and some comments may be shown as answers.
Ashleigh L
Top achievements
Rank 1
Ashleigh L asked on 05 Jan 2016, 06:53 PM

How does the paging work in the ListView selection example ( I've checked the data and there doesn't appear to be any information in the JSON about total rows/item count.

I've copied the example into my own project, and changed the datasource to pull from our DB, and the pager is showing 0 rows/no items to display. This is the JSON I'm passing to the list view/pager:


And the list view/pager init:

var datasource = new{
    transport: {
        read: {
            type: "GET",
            url: "MainController.cfc?method=getIcons",
            processData: true,
            dataType: "json",
            cache: false
    schema : {
        type: "json",
        data: "Icons"
        dataSource: datasource
    dataSource: datasource,
    selectable: "multiple",
    template: kendo.template($("#icon_list_template").html())

1 Answer, 1 is accepted

Sort by
Dimiter Topalov
Telerik team
answered on 08 Jan 2016, 10:00 AM
Hi Shimmoril,

When the data response is an array, its length is calculated and used as the total value. When the response is an object, you'll need to set the total explicitly in your schema. Here is the relevant section of our documentation:

Check out this dojo for sample implementations, using both an array and an object for data:

I hope this helps.

Dimiter Topalov
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
Ashleigh L
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question