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

Server paging and ListView's loadMore

3 Answers 257 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 18 Apr 2012, 01:11 AM
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?

$("#searchResultsListView").kendoMobileListView({
    dataSource: ds,
    template: "#= f #",
    headerTemplate: "${value}",
    loadMore: true
});


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'
        }
      }
    }
  }
});

3 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 18 Apr 2012, 01:38 AM
I don't think that load more is even in the currently published ListView control.  Searching the minified JS results in 0 hits for it.  Methods like appendOnRefresh turn up hits.  The demos site doesn't have any reference to loadMore.  :(.  Also disappointing that the demos site lists refresh as a method but the docs site doesnt.
0
Georgi Krustev
Telerik team
answered on 18 Apr 2012, 11:35 AM
Hi,

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 confusions.

Greetings,
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!
0
Vijay
Top achievements
Rank 1
answered on 10 May 2012, 01:58 PM
Hello, 

We want to control if paging is done on click or server based on total count. Can I change ServerPaging = true | false based on total count. 

please let me know
Tags
ListView (Mobile)
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Georgi Krustev
Telerik team
Vijay
Top achievements
Rank 1
Share this question
or