This is a migrated thread and some comments may be shown as answers.

How do I remove the contextual tabs in the spreadsheet?

4 Answers 385 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Larissa
Top achievements
Rank 1
Larissa asked on 17 Feb 2016, 03:40 PM

Hi,

I would like to customize the spreadsheet for my application. But I can't figure out how.

I would like to remove the contextual tabs, the undo/redo buttons, the toolbar and the formula bar.

But it may be useful to keep the "header" where these "components" are right now.

How can I do that?

Thanks.

4 Answers, 1 is accepted

Sort by
0
Larissa
Top achievements
Rank 1
answered on 17 Feb 2016, 07:15 PM

Found a way to "remove" the "header".

 

$("#spreadsheet").kendoSpreadsheet();

    // remove spreadsheet header
    var widget = $('#spreadsheet').data('kendoSpreadsheet');
    widget._view.formulaBar.element[0].style.display = 'none';
    widget._view.tabstrip.element[0].style.display = 'none';

 

Visually is ok. I'm gone to see if it doesn't affects the functionality.

0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 17 Feb 2016, 07:59 PM
Hi Larissa,

Please take a look at this Telerik Dojo which illustrates how to hide those elements.  

You can hide the toolbar by setting it to false in the widget.
If you wanted to hide the sheetsbar, you can set that to false too.

The Formula Bar involves some custom jQuery, and resizing the spreadsheet.  Here's one way to remove it:
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var formulaBar = spreadsheet.element.children()[0];
formulaBar.remove();
spreadsheet.resize();

Hopefully, this helps steer you in the right direction.

Regards,
Patrick
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Larissa
Top achievements
Rank 1
answered on 18 Feb 2016, 11:17 AM

It works great. I didn't found this on the documentation because I was looking in the wrong place.

Thank you so much.

0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 19 Feb 2016, 03:20 PM
Hello Larrissa,

Glad everything is working great!  

Regards,
Patrick
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Spreadsheet
Asked by
Larissa
Top achievements
Rank 1
Answers by
Larissa
Top achievements
Rank 1
Patrick | Technical Support Engineer, Senior
Telerik team
Share this question
or