Articles in this section
Category / Section

How to show the busy indicator while loading the data in the UWP DataGrid?

1 min read

You can show an indication of the data loading with the help of the BusyIndicator while in the UWP DataGrid. You can display the BusyIndicator by setting the BusyIndicator.IsBusy to true when loading the data. Once loaded, you can stop it by setting the BusyIndicator.IsBusy to false by handling the ItemsSourceChanged event of the SfDataGrid.

<Syncfusion:SfBusyIndicator Name="sfBusyIndicator"
                        IsBusy=”True”
                        VerticalAlignment="Center"
                        AnimationType="Gear">
</Syncfusion:SfBusyIndicator>

 

Here, the BusyIndicator is stopped after the SfDataGrid.ItemsSource is changed by handling the ItemsSourceChanged event.

SfdataGrid.Loaded += SfdataGrid_Loaded;
SfdataGrid.ItemsSourceChanged += SfdataGrid_ItemsSourceChanged;
async void SfdataGrid_Loaded(object sender, RoutedEventArgs e)
{
    this.SfdataGrid.ItemsSource = await (this.DataContext as ViewModel).GetRecords();
}
void SfdataGrid_ItemsSourceChanged(object sender, GridItemsSourceChangedEventArgs e)
{
    sfBusyIndicator.IsBusy = false;
}

 

The following screenshot shows the BusyIndictor before loading the data into the view.

D:\busy.png

 

Sample Links:

 

WPF

 

WinRT

 

UWP


Conclusion

I hope you enjoyed learning about how to show the busy indicator while loading the data in the SfDataGrid.


You can refer to our UWP DataGrid feature tour  page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our UWP DataGrid example
to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal.

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