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

endlessScroll is invalid or DataSource is invalid.

1 Answer 41 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
mjohn mjohn
Top achievements
Rank 1
mjohn mjohn asked on 10 Oct 2013, 01:06 PM
Hi. 
   I try your listview step by step, when i learn "endlessScroll": http://docs.kendoui.com/api/mobile/listview#configuration-endlessScroll
  I found it is invalid when use DataSource's filter.    may this is DataSource's bug.
  Below is the code:  also can run below code in: http://jsbin.com/AdItib/5/edit
  ////////////////////////////////////////////////Begin/////////////////////////////////////////////
<div data-role="view">
  <ul data-role="listview" data-source="foo" data-endless-scroll="true" data-template="foo-template">
  </ul>
</div>

<script type="text/x-kendo-template" id="foo-template">
    #: name # - #: modified #
</script>

<script>
var i = 0, pageSize = 20;

var max = 1000;
var data = [];
for (; i < max; i ++) {
    data.push({ name:  i, modified: +new Date() });
}

var foo = new kendo.data.DataSource({data:data, pageSize: pageSize});

foo.filter({ field: "name", operator: "gt", value: "200" });

new kendo.mobile.Application();
</script>
  ////////////////////////////////////////////////End/////////////////////////////////////////////
Below code show no results, if  i remove foo.filter({ field: "name", operator: "gt", value: "200" }); then listview will show result.
So ListView's endlessScroll is invalid when DataSource has filter.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 11 Oct 2013, 08:48 AM
Hello,

I can confirm this problem - we are looking into addressing this for our next major release (along with support for local data). 

To clarify - currently the virtual scrolling mechanism supports only server-side paging and filtering.

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
mjohn mjohn
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or