How do I remove the contextual tabs in the spreadsheet?

5 posts, 0 answers
  1. Larissa
    Larissa avatar
    19 posts
    Member since:
    Dec 2015

    Posted 17 Feb Link to this post

    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.

  2. Larissa
    Larissa avatar
    19 posts
    Member since:
    Dec 2015

    Posted 17 Feb in reply to Larissa Link to this post

    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.

  3. Kendo UI is VS 2017 Ready
  4. Patrick
    Admin
    Patrick avatar
    173 posts

    Posted 17 Feb Link to this post

    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!
     
  5. Larissa
    Larissa avatar
    19 posts
    Member since:
    Dec 2015

    Posted 18 Feb in reply to Patrick Link to this post

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

    Thank you so much.

  6. Patrick
    Admin
    Patrick avatar
    173 posts

    Posted 19 Feb Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready