OnDemandAutomatic oddities

2 posts, 0 answers
  1. Jessi
    Jessi avatar
    6 posts
    Member since:
    May 2014

    Posted 11 Jan 2015 Link to this post

    From my observation, OnDemandAutomaticatic will trigger DataRequested when you scroll to the bottom of the list, but it will also trigger unexpectedly in some scenarios.

    1. When the datacontext is not null and you change the DataVirtualizationMode to OnDemandAutomatic. This will trigger data requested. Sometimes it will trigger a second DataRequested event immediately after populating the list even with no user action. I believe this has to do with the listbox being in a pivot.

    2. If a network error occurs while responding to DataRequested, the "loading.." animation will remain until you set it to OnDemandNone. Setting it to OnDemandNone defeats the point of automatic scroll. We should be able to tell it to cancel loading, just like we do with PullToRefresh.

    3. The above two issues causes problems when restoreing the app from a Tombstoning.

    (a). DataRequested is triggered before OnNavigatedTo is done restoring data. So I have to set the ListBox to OnDemandNone, then flip it to OnDemandAutomatic (and this can trigger a 2nd load).

    (b) Sometimes the user does not have an internet connection when data is restored. So DataRequested fails but the loading animation just stays there and nothing happens after network conditions change.

    My suggestion if you're going to keep it as is, please document explicitly when & what triggers a DataRequested event, including strategies for handling tombstones. (or just provide a way to cancel automatic loading in case it fails).
  2. Tsvyatko
    Tsvyatko avatar
    832 posts

    Posted 15 Jan 2015 Link to this post

    Hello Jessi,

    Thank you for contacting us! We will investigate this scenario in order to provide more intuitive API/behavior.

    Thank you for your suggestions! I have updated your telerik points accordingly.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft banner
Back to Top