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

9 posts, 0 answers
  1. Don
    Don avatar
    15 posts
    Member since:
    Apr 2011

    Posted 18 Jul 2013 Link to this post

    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.
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 22 Jul 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Don
    Don avatar
    15 posts
    Member since:
    Apr 2011

    Posted 23 Jul 2013 Link to this post

    Which Kendo UI version were the new listview manipulation methods added
  5. Don
    Don avatar
    15 posts
    Member since:
    Apr 2011

    Posted 23 Jul 2013 Link to this post

    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.
  6. Don
    Don avatar
    15 posts
    Member since:
    Apr 2011

    Posted 24 Jul 2013 Link to this post

    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.
  7. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 25 Jul 2013 Link to this post

    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!
  8. Don
    Don avatar
    15 posts
    Member since:
    Apr 2011

    Posted 25 Jul 2013 Link to this post

    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).
  9. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 29 Jul 2013 Link to this post

    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!
  10. KSBA Techie
    KSBA Techie avatar
    27 posts
    Member since:
    Aug 2012

    Posted 11 Aug 2013 Link to this post

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