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

Server paging and ListView's loadMore

1 Answer 245 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 17 Apr 2012, 12:03 PM
In odata __next is specified to let the datasource know how to request more results.  I'm using hand rolled json and my listview isn't showing the loadmore button.  What do I need to do to let it know it should request the same URL but increment the page number?

var ds = new kendo.data.DataSource({
  transport: {
    read: {
      url: "http://localhost:3000/api/anagram",
      dataType: "jsonp",
      data: {
        format: 'html'
      }
    },
    parameterMap: function(options) {
      if (options.filter && options.filter.filters.length > 0)
        return {
          rack: options.filter.filters[0].value.replace(/\?/g,'-'),
          format: 'html',
          limit: options.pageSize,
          page: options.page
        };
      return options;
    }
  },
  group: 'length',
  pageSize: 10,
  page: 1,
  sort: {field: 'w', dir: 'asc'},
  filter: { field: 'rack', operator: 'eq', value: 'z' },
  serverFiltering: true,
  serverPaging: true,
  serverGrouping: true,
  serverSorting: true,
  error: function(e){
    alert(e);
    console.log(e);
  },
  change: function(e) {
    console.log('Data changed: ' + this.total());
  },
  schema: {
    groups: 'groups',
    total: 'count',
    model: {
      fields: {
        length: {
          type: 'number'
        },
        w: {
          type: 'string'
        },
        f: {
          type: 'string'
        }
      }
    }
  }
});

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 18 Apr 2012, 10:25 AM
Hello Ryan,

 
The "load more" functionality, as the "endless scrolling" will be available for the next service pack of the KendUI, which will be available only for paid customers. The loadMore option is not available in the 2012.1 322 version of the KendoUI. I have updated the documentation to avoid any further confusion.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Ryan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or