Once a ListView with endless scrolling reaches the end of the DataSource, you can't ever get it to page again

5 posts, 1 answers
  1. Jonathan M
    Jonathan M avatar
    16 posts
    Member since:
    Sep 2012

    Posted 21 Feb 2013 Link to this post

    If you have a ListView bound to a DataSource with endless scrolling enabled, once you reach the end of the DataSource, you cannot get it to load additional pages of data again. This becomes an issue when you change the data in your ListView by re-querying the data source (through the "filter" and/or "query" functions on the DataSource object). 

    In our specific scenario we have 2 views. The first view, "View A," contains inputs. The second view, "View B," contains the ListView that is bound to a DataSource and has endless scrolling enabled. When the user enters data in the inputs on View A and clicks the submit button, we call the query() function on the DataSource passing the data from the inputs and navigate to View B. The user can then click Back, change the search parameters on View A, hit Submit again, and view the results of the new parameters on the ListView in View B.

    This works great, as long as the user never scrolls to the end of the data in the DataSource. Once they do this once, they can never scroll beyond the first page of data again without restarting the app.

    Is this just a limitation of the ListView and endless scrolling, or are we missing something?

    Thanks,
    Jonathan Marston



  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 25 Feb 2013 Link to this post

    Hello Jonathan,

     
    Currently, Mobile Listview does not support  endless-scrolling with filtering, because the endless scrolling will be disabled once the last page is reached. We will expose public method for the next official release which will allow to re-enable endless-scrolling. For now you can use _bindScroller private method to re-enable endless-scrolling. Check this jsBin demo for more information.

    Kind 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!
  3. Kendo UI is VS 2017 Ready
  4. Jonathan M
    Jonathan M avatar
    16 posts
    Member since:
    Sep 2012

    Posted 25 Feb 2013 Link to this post

    Thanks for the quick reply. I have implemented the workaround in our project and it is working fine now.

    Thanks,
    Jonathan
  5. Damien
    Damien avatar
    8 posts
    Member since:
    Jan 2013

    Posted 14 Oct 2013 Link to this post

    Hi, since upgrading Kendo the _bindScroller isn't availble, I am getting error messages and the list won't populate.

     var list = $("#listing-pull-to-refresh-listview").data("kendoMobileListView");
      app.scroller().reset();
      list.dataSource.page(1);
      list._bindScroller();
      list.dataSource.read({ page: 1, rpp: 12 });
      
    Thanks :)

  6. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 16 Oct 2013 Link to this post

    Hi Jonathan,

    in Q2, the endless scrolling was re-implemented in order to support virtualization mode. This lead to some breaking changes in the way the datasource is configured - I would like to suggest that you look through our updated documentation and demos in case something does not work as expected after the upgrade.

    As far as I can see, the new implementation eliminates the need for this workaround. Re-populating the datasource with new data should cause the listview to refresh and scroll to the top automatically. 


    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready