Loading Animation in ASP.NET Core Grid Component

9 Sep 20221 minute to read

The grid has an option to show a loading indicator in-between the time of fetching the data and binding it to the grid during initial rendering or refreshing or after performing any grid action like sorting, filtering, grouping, and more. The grid supports two indicator types, which is achieved by setting the loadingIndicator.indicatorType property to Spinner or Shimmer. The default value of the indicator type is “Spinner.”

In the following sample, the Shimmer indicator is displayed while the grid is loading and refreshing when using the remote data.

<ejs-grid id="Grid"  allowPaging="true" allowSorting="true"  allowFiltering="true">
    <e-grid-loadingIndicator indicatorType="Shimmer"></e-grid-loadingIndicator>
    <e-grid-pageSettings pageCount="3"></e-grid-pageSettings>                    
    <e-data-manager url="https://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders/" adaptor="ODataAdaptor"></e-data-manager>
        <e-grid-column field="OrderID" headerText="Order ID" width="130"></e-grid-column>
        <e-grid-column field="CustomerID" headerText="Customer ID" width="150"></e-grid-column>
        <e-grid-column field="EmployeeID"  headerText="Employee ID" textAlign="Right" width="115"></e-grid-column>
        <e-grid-column field="Freight" headerText="Freight" format="C2" textAlign="Right" width="150"></e-grid-column>
        <e-grid-column field="ShipCountry" headerText="Ship Country" width="150" textAlign="Center"></e-grid-column>
public IActionResult Index()
    return view();