Articles in this section
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

C:\Users\pavithra.sivakumar\AppData\Local\Microsoft\Windows\INetCacheContent.Word\in forms.png

 

Sample Link

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

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied