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

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

4 Answers 232 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Jonathan M
Top achievements
Rank 1
Jonathan M asked on 21 Feb 2013, 10:49 PM
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



4 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 25 Feb 2013, 10:36 AM
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!
0
Jonathan M
Top achievements
Rank 1
answered on 25 Feb 2013, 05:18 PM
Thanks for the quick reply. I have implemented the workaround in our project and it is working fine now.

Thanks,
Jonathan
0
Damien
Top achievements
Rank 1
answered on 14 Oct 2013, 11:17 PM
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 :)

0
Petyo
Telerik team
answered on 16 Oct 2013, 02:56 PM
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!
Tags
ListView (Mobile)
Asked by
Jonathan M
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Jonathan M
Top achievements
Rank 1
Damien
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or