How to hide loder image in grid while sorting

Hi,

How can i hide this loader image in grid?



Thanks,
Sneha

1 Reply 1 reply marked as answer

SM Shalini Maragathavel Syncfusion Team March 26, 2021 12:20 PM UTC

Hi Sneha,

Thanks for contacting Syncfusion support.

Based on your requirement we suspect that you need to hide the spinner while perform Sorting in the Grid. By default in EJ2 Grid the spinner will be display while performing the data operations like Paging, Searching, Sorting, etc.  

Once the data loaded into the grid then the spinner will be hidden in the Grid and it is the default behavior of Grid. You can achieve your requirement of hiding the spinner while perform sorting in the Grid by using actionBegin event of Grid as demonstrated in the below code snippet, 

app.component.css
 
.spinnerhide { 
  display: none !important; 
}
----------------------------------------------

ngOnInit(): void { 
    
 
  actionBegin(args) { 
    var spinner = this.grid_1.element.querySelector(".e-spinner-pane"); 
    if (args.requestType === "sorting") { 
      spinner.classList.add("spinnerhide"); 
       
    } else if (spinner.classList.contains("spinnerhide")) { 
      spinner.classList.remove("spinnerhide"); 
   
 

You can
hide the spinner for all the data operations by using the custom CSS as demonstrated in the below code snippet, 

app.component.css
 
.e-grid .e-spinner-pane { 
  display: none; 
}

 


Please refer the below sample for your reference.

Sample: https://stackblitz.com/edit/angular-dryluv-dxxren?file=app.component.css 

Please get back to us, if you need any further assistance. 


Regards,
Shalini M.
 
 


Marked as answer
Loader.
Up arrow icon