We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to display a busy indicator when refreshing the data source asynchronously?

An animation can be displayed when refreshing the data source asynchronously by adding an UIActivityIndicatorView in the view.

Refer the below code example in which an UIActivityIndicatorView is used to display an animation when the grid is refreshed in a button click.

public MyViewController()


   sfDataGrid = new SfDataGrid();

   viewModel = new ViewModel();

   sfDataGrid.ItemsSource = viewModel.OrdersInfo;

   activityIndicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);

   refresh_button = new UIButton();

   refresh_button.TouchUpInside += Refresh_button_TouchUpInside;

   refresh_button.SetTitle ( "Refresh",UIControlState.Normal);





   View.BackgroundColor = UIColor.White ;



private async void Refresh_button_TouchUpInside(object sender, EventArgs e)


     activityIndicator.Frame = new CoreGraphics.CGRect(0, 50, this.View.Frame.Width, this.View.Frame.Height);


     await Task.Delay(new TimeSpan(0, 0, 3));





Note: If the data source implements ICollectionChanged interface, then SfDataGrid will automatically refresh the view when an item is added, removed or cleared. If the data model implements the INotifyPropertyChanged interface, then the SfDataGrid responds to the property change in runtime to update the view.


                C:\Users\pavithra.sivakumar\AppData\Local\Microsoft\Windows\INetCacheContent.Word\refreshin ios.png


Sample Link

How to display a busy indicator when refreshing the data source asynchronously?

Article ID: Published Date: Last Revised Date: Platform: Control:
7375 01/31/2017 01/31/2017 Xamarin.iOS SfDataGrid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon