Manually display ActivityIndicator

4 posts, 0 answers
  1. Gerry
    Gerry avatar
    25 posts
    Member since:
    Jan 2017

    Posted 15 Feb Link to this post

    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?
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1230 posts

    Posted 20 Feb Link to this post

    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
  3. Gerry
    Gerry avatar
    25 posts
    Member since:
    Jan 2017

    Posted 20 Feb in reply to Pavel R. Pavlov Link to this post

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

    I want to start the refresh indicator.

  4. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    359 posts

    Posted 20 Feb Link to this post

    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
Back to Top