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

Manually display ActivityIndicator

3 Answers 152 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Gerry
Top achievements
Rank 1
Gerry asked on 15 Feb 2017, 07:52 PM
RadListView has an 'update' gesture, which displays an ActivityIndicator. I'm getting data via Restful when the page loads and would like to display the built-in activity indicator - how might one do this?

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 20 Feb 2017, 07:44 AM
Hello Gerry,

Thank you for contacting us on that matter. Indeed we need to update our documentation to better describe this feature. Currently the RadListView exposes the â€‹IsPullToRefreshActive property as well as the EndRefresh() method. This allows you to manually stop the loading whenever your service logic ends. Please give this a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Gerry
Top achievements
Rank 1
answered on 20 Feb 2017, 05:30 PM

Please check my message again - I know how to stop the refresh indicator.

I want to start the refresh indicator.

0
Lance | Manager Technical Support
Telerik team
answered on 20 Feb 2017, 08:26 PM
Hi Gerry,

There are two paradigms, and their ActivityIndicators, for the RadListView

- PullToRefresh (appears at the top)
- LoadOnDemand (appears at the bottom)


PullToRefresh
From the way you describe your question, I think you're referring to this option. This is a user-initiated gesture, thus there's no StartRefresh() option that will programmatically pull down the list and show the indicator. The only method available for this approach EndRefresh.


LoadOnDemand
There is an alternative to achieve the effect you're looking for with LoadOnDemand. With this approach, you do have control over the activity indicator at the bottom when the list gets more items.

There are two options:

- Manual -
The user taps the button at the bottom which then turns into an ActivityIndicator. You can find the documentation, with code examples, here

 -Automatic -
The ActivityIndicator will automatically show at the bottom because the ListView will get the next set of items when the list is scrolled to within a few items of the end of the list. You can find the documentation and code example for Automatic mode here.


Non-Telerik Option

If you don't want the LoadOnDemand option, then my only remaining suggestion would be to use an overlay with an ActivityIndicator outside of the ListView and bind it to your ViewModel using an "IsBusy" boolean property. You can then bind the overlay's "IsVisible" property to "IsBusy" boolean and whenever you're refreshing the items, you toggle IsBusy.

Please let us know if you have any further questions.

Regards,
Lance | Tech Support Engineer, Sr.
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Gerry
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Gerry
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Share this question
or