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

Scrolling up in a ListView with endlessScroll skips to the start of the last page

5 Answers 76 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Don
Top achievements
Rank 1
Don asked on 01 Mar 2014, 10:23 PM
If you have a ListView with endlessScroll turned on and bound to a remote dataSource, if you use .query (http://docs.telerik.com/kendo-ui/api/framework/datasource#methods-query) to display a page of data (let's say page 4), it will initially display correctly.  However, if you scroll up, instead of showing the *last* record of page 3, it will show the *first* record of page 3 (i.e. it "jumped" back all the way to the start of page 3 instead of scrolling up through the contents of page 3).

In case that wasn't clear, here is a detailed example.

- I .query() for page 10 with pageSize set to 100.
- ListView shows records 1000, 1001, 1002, etc. as expected.  If you scroll down, the appropriate records are shown, as expected.
- Scrolling up from that point should show records 999, 998, 997, etc.  However, it will jump right to record 900.

5 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 04 Mar 2014, 10:51 AM
Hello Donald,

Thank you very much for your interest in Kendo UI Mobile.

Due to its complex implementation the mobile ListView does not support dataSource query() or page() methods when used in endless scrolling mode. As it only loads the items that are currently displayed in the view, in order to optimize the number of components these features are not supported.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Don
Top achievements
Rank 1
answered on 05 Mar 2014, 05:41 AM
Do you have any suggestions on how one would display a subset of a list of tens of thousands of records (remote data source) using Kendo UI Mobile?  I'm not saying that you'd necessarily have to have all tens of thousands of records displaying at once, but you'd need to be able to see a subset of that data.  Knowing what I know now, the best I can come up with is just an "index" page with links that say "1-100 101-200 301-400..." with each of those linking to a view with a ListView.  That seems like a clunky solution.  Are there any better options?

Also, for the benefit of others who might also spend a lot of time (as I have) trying to get endlessScroll (or even loadMore) to work with a large set of data, it would be great if any limitations such as the ones you described were clearly spelled out in the documentation.
0
Kiril Nikolov
Telerik team
answered on 06 Mar 2014, 11:59 AM
Hi Donald,

Maybe the best approach is to use the Kendo UI Mobile ListView with filtering. You can still implement the endless scrolling functionality, but you can also filter the options on the server and return the updated dataSource to the widget. This will give the user the ability to search for its record(or you can do this programmatically) and still use the endless scrolling. 

Please check the following demo:

http://demos.telerik.com/kendo-ui/mobile/listview/filtering.html

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Don
Top achievements
Rank 1
answered on 06 Mar 2014, 03:16 PM
Thanks for the suggestion.  Unfortunately, it doesn't meet my needs because I need the user to be able to scroll/page up or down from his position in the list.  I will just live with this for now and add a request to UserVoice.
0
Kiril Nikolov
Telerik team
answered on 06 Mar 2014, 04:43 PM
Hello Donald,

Thank you very much for your understanding.

In case you have any further questions, please do not hesitate to contact us.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Report a bug
Asked by
Don
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Don
Top achievements
Rank 1
Share this question
or