Collapsing the Ribbon in the Spreadsheet

Hi

Is there a way to set the Ribbon on the spreadsheet control so it's collapsed by default?

Thanks

3 Replies

SI Silambarasan I Syncfusion Team March 12, 2019 09:15 AM UTC

Hi Damien, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported query and your requirement ‘To enable the ribbon in a collapsed state’ can be achievable by using ‘collapse()’ client-side method from ejRibbon instance in Spreadsheet. Please refer the following code example. 
 
 
<div id="Spreadsheet"></div> 
 
$(function () { 
    $("#Spreadsheet").ejSpreadsheet({ 
        //... 
        loadComplete: "onLoadComplete" 
    }); 
}); 
 
function onLoadComplete(args) { 
    //Collapse ribbon option 
    $("#" + this._id + "_Ribbon").data("ejRibbon").collapse(); 
} 
 
 
Demo sample: 
 
Regards, 
Silambarasan 



IT infrastructure Team March 13, 2019 05:51 AM UTC

Worked a treat! 

Thanks a lot.


SI Silambarasan I Syncfusion Team March 13, 2019 08:41 AM UTC

Hi Damien, 
 
Most welcome. Please get back to us if you need any further assistance. We are happy to help you out. 
 
Regards, 
Silambarasan 


Loader.
Up arrow icon