ListView + Pager

2 posts, 0 answers
  1. Ashleigh L
    Ashleigh L avatar
    113 posts
    Member since:
    Jun 2012

    Posted 05 Jan 2016 Link to this post

    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())

  2. Dimiter Topalov
    Dimiter Topalov avatar
    1292 posts

    Posted 08 Jan 2016 Link to this post

    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!
Back to Top