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

endless scroll stops after adding an item to the data-source

8 Answers 126 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 18 Jul 2013, 05:15 PM
I have a listview with a data-source that's setup to get 10 items at a time and perform endless scroll.  This list is basically a chat wall, so when it's first loaded I'll get the most recent 10 posts and if user scrolls down I'll get older posts, etc.  While the user is actively in the list, if a new post arrives I'm simply adding the post to the data source which is then appending the new post to the listview, etc.  However, once I add an item to the data source the endless scroll no longer works when the user scrolls down.

After adding the item to the data source, do I need to set anything else on the data source to keep endless scroll alive.  I'm originally setting the schema.total to zero since the user will basically never reach the end of the data items anyway.

8 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 22 Jul 2013, 02:19 PM
Hello Don,

Supporting such case is relatively complicated with the current endless scrolling implementation (which relies on the datasource internal paging mechanism). In general, such UI patterns are usually implemented with a pull to refresh functionality. 

You may consider implementing such behavior manually, using our newly introduced listview manipulation methods, and binding to the scroller scroll method.

Regards,
Petyo
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 23 Jul 2013, 06:19 PM
Which Kendo UI version were the new listview manipulation methods added
0
Don
Top achievements
Rank 1
answered on 23 Jul 2013, 07:02 PM
I just updated to 2013.2.716 because the listview prepend() function was reporting it was not valid at version 2013.1.703.  So I am now at the very latest version.  However, my list views with endless-scroll no longer work as-is and I see this in the breaking changes of the release notes:

Breaking Change: Pull to Refresh / Endless Scrolling trigger virtual mode for the listview widget, which behaves in a different manner than current implementation

If I remove endless-scroll then it renders the list successfully, but of course I lose endless-scroll.  I'm not sure what I need to change to allow endless scroll with the breaking change above.
0
Don
Top achievements
Rank 1
answered on 24 Jul 2013, 02:40 PM
I don't understand what I need to change about my endless scroll lists to get them to work in the 2013 Q2 release.  I have read all of the forums, and documentation.  I understand endless scroll makes the list view switch to "virtual" mode, and I somewhat understand what "virtual" mode from reading the user guide.  But is there something else I'm missing here?  Should I do anything else different with my lists when they "virtual" or not?  Shouldn't I still see something show up in the list?

This release's breaking change seems to have caught a lot of people with this one since the forum is filled with similar issues.

I'm in the 11th hour with an app I've been developing for 6 months and am trying to shake out a couple of final bugs before releasing it.  This is pretty much my final hurdle and i'm completely stuck.
0
Petyo
Telerik team
answered on 25 Jul 2013, 03:32 PM
Hi Don,

The virtual mode features several specific settings, most of them being in the datasource configuration, as the virtualization relies on the datasource paging mechanism. 

The scenario you describe in your initial post describes a complex case, which most likely will not work with the endless scrolling assumptions - this is why I suggested that you avoid using the built-in endless scrolling mechanism and append items manually. 

Regards,
Petyo
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 25 Jul 2013, 03:54 PM
I understand that, and that's what I'm going to have to do to append items.  But I don't understand why my same datasource and listview just stopped working once I upgraded to the latest version.  Shouldn't I at least see page 1 of my data (taking the appending of new items aside)?  I see many questions on the forum about this and am just trying to understand it because the documentation hasn't clarified what else needs to be changed with the new version (aside from the listview being the only widget in the scroller, which mine is).
0
Petyo
Telerik team
answered on 29 Jul 2013, 08:06 AM
Hello Don,

I am not sure what your case is. My guess is that the datasource is not configured correctly - the new virtualization methods rely on datasource server paging, which in turn requires settings like schema total and pageSize. If you think that you have those options configured correctly, but the example still does not work, can you post a sample or an URL where we can see what goes on? Thank you in advance.  

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
KSBA Techie
Top achievements
Rank 1
answered on 11 Aug 2013, 06:48 AM
Peyto,

This is a bug in the new release.  I'm receiving it too and continue to with the latest build.

It's nothing to do with configuring schema total or not following the documentation...

Nathan
Tags
ListView (Mobile)
Asked by
Don
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Don
Top achievements
Rank 1
KSBA Techie
Top achievements
Rank 1
Share this question
or