Category / Section
How to display an animation when refreshing the data source asynchronously?
1 min read
An animation can be displayed when refreshing the data source asynchronously by using a ProgressDialog.
Refer the below code example in which a progress dialog is used to display an animation when the grid is refreshed. If the data model implements the INotifyPropertyChanged interface, then the SfDataGrid responds to the property change in runtime to update the view.
refresh_button.Click += Button_Click; private async void Button_Click(object sender, EventArgs e) { progressDialog.SetMessage("Refreshing"); progressDialog.Show(); await Task.Delay(new TimeSpan(0, 0, 2)); viewModel.LoadMoreItems(); progressDialog.Hide(); }
Screenshot
Sample Link
How to display a busy indicator when refreshing the data source asynchronously?