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

OnDemandAutomatic oddities

1 Answer 33 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jessi
Top achievements
Rank 1
Jessi asked on 11 Jan 2015, 03:21 PM
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).

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 15 Jan 2015, 08:01 AM
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.

Regards,
Tsvyatko
Telerik
 

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.

 
Tags
DataBoundListBox
Asked by
Jessi
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or