Spreadsheet : collapsed the ribbon for initial loading

Hi

I want to hide/collapsed the ribbon for initial loading so that only tab names are only visible(Home, Insert...etc), as follows, ps: i don't want to disable or remove it all I want is it should be collapsed for initial loading



is there's a way to achieve this?


1 Reply

JS Janakiraman Sakthivel Syncfusion Team September 1, 2021 12:59 PM UTC

Hi Thilini, 
 
Thanks for contacting Syncfusion support.  
  
We have checked your query. We can achieve your reported requirement of "collapsing the ribbon for initial loading" by adding the 'e-collapsed' class to the ribbon element in the created event. Please refer the below code snippet and sample. 
  
  
<ejs-spreadsheet #default (created)="created()"></ejs-spreadsheet> 
 
created() { 
        this.spreadsheetObj.element.getElementsByClassName('e-control e-ribbon')[0].classList.add('e-collapsed'); 
    } 
  
  
    
Could you please check the above details, and get back to us, if you need assistance on this.  
  
Regards,
Janakiraman S
 


Loader.
Up arrow icon