endlessScroll is invalid or DataSource is invalid.

2 posts, 0 answers
  1. mjohn mjohn
    mjohn mjohn avatar
    9 posts
    Member since:
    Mar 2010

    Posted 10 Oct 2013 Link to this post

    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!

  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 11 Oct 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top