Don't show grid spinner

Hi, it's possible to hide the grid spinner and use only the spinner set for the page load ?

Thanks in advance
Stefano

7 Replies

RS Renjith Singh Rajendran Syncfusion Team February 12, 2020 10:23 AM UTC

Hi Stefano, 

Thanks for contacting Syncfusion support. 

We suspect that you would like to hide our default Grid spinner, and display your own customized spinner during the page load. If so, the we suggest you to add the below style to your application to hide the spinner shown in Grid. Please use the code below, 

 
<style> 
    .e-grid .e-spinner-pane{    //hide the Grid spinner 
        display:none; 
    } 
</style> 


If we have misunderstood your query, kindly get back to us with the detailed description of your complete requirement to proceed further. 

Regards, 
Renjith Singh Rajendran. 



SC Stefano Capobianco February 17, 2020 06:44 AM UTC

Hi, i need to show a spinner at loading page and hide it when the page was fully  loaded.

I need also to show the spinner everytime i do any operation with the grid ( loadin, looking record, sorting, etc.).

Thanks
Stefano


RS Renjith Singh Rajendran Syncfusion Team February 18, 2020 08:53 AM UTC

Hi Stefano, 

We suspect that, you would like to hide the default Grid spinner and display your own customized spinner in Grid. If so, then we suggest you to hide the default Grid’s spinner by using the suggestion from our previous update, and then show/hide the customized spinner by using the Grid events(OnLoad, DataBound, OnActionBegin etc.), which will be triggered for each corresponding actions in Grid. 

Bind the Grid events which will be triggered when performing corresponding actions like initial load or data bind or perform any data operations. And in those event handlers you can show/hide the customized spinner. We have prepared a sample to achieve this requirement. Please download the sample from the link below, 
 
In the below code, we have bound OnLoad, DataBound, OnActionBegin events to Grid. And in those event handlers we have shown and hidden the customized spinner by using the ShowSpinner()/HideSpinner() methods of EjsSpinner component. Please refer the codes below, 

 
    <div id="container"></div> 
    <EjsSpinner @ref="SpinnerObj" Target="#container" CssClass="e-spin-overlay" >     @*Render the EjsSpinner component*@ 
    </EjsSpinner> 
 
    <EjsGrid DataSource="@Orders" AllowPaging="true" AllowSorting="true" Height="315"> 
        <GridEvents OnLoad="OnLoad" DataBound="DataBound" OnActionBegin="OnActionBegin" TValue="Order"></GridEvents> 
        ... 
    </EjsGrid> 
 
@code{ 
    public List<Order> Orders { get; set; } 
    EjsSpinner SpinnerObj; 
    string target { get; set; } = "#container"; 
    public async void OnLoad()                        //Show the spinner using initial Grid load 
    {  
        SpinnerObj.ShowSpinner(target); 
    } 
    public async void DataBound()                      //Hide the spinner after the data is bound to Grid(during data operations also this will be triggered) 
    { 
        SpinnerObj.HideSpinner(target); 
    } 
    public void OnActionBegin(ActionEventArgs<Order> args) 
    { 
        if (args.RequestType.ToString() == "Sorting")     //Based on request type, show the spinner when sorting action starts 
        { 
            SpinnerObj.ShowSpinner(target); 
        } 
    } 
    ... 
} 


 
Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



SC Stefano Capobianco February 18, 2020 03:49 PM UTC

Thanks the solution work very well

Stefano


RS Renjith Singh Rajendran Syncfusion Team February 19, 2020 05:04 AM UTC

Hi Stefano, 

Thanks for your update. 

We are glad to hear that our suggestion helped you in achieving your requirement. 

Please get back to us fi you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



VM veymar montano colque January 20, 2021 11:40 PM UTC

Hi syncfusion, I wonder if it is possible also to have a custom loader indicator in the grid component as follows:


As you can see in the image the loader indicator should be located between the headers and the rest of the data. Thanks in advance for your answer


RS Renjith Singh Rajendran Syncfusion Team January 21, 2021 12:57 PM UTC

Hi veymar,  

Greetings from Syncfusion.  

Please follow up with the below thread for future updates regarding this query. 

Regards,  
Renjith R 


Loader.
Up arrow icon