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

hide/remove everything but the cells

1 Answer 185 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 26 Nov 2018, 04:41 PM

Hello - I expect what I want to do is not supported. I that it he case, then I'll abandon this cool idea I have and not use the kendo spreadsheet.

I need a view-only mode that just shows the cells where they cannot be edited/modified. I need an admin-only mode where the entire spreadsheet control is functional.

For the view-only mode I tried the following, which does hide most of the stuff I don't want. But it requires more work to adjust heights and handle click events, at least. As it is when I do this various script errors are occurring when I click within the spreadsheet div:

    $(document).ready(function () {
        $('.k-spreadsheet-sheets-bar').hide();
        $('.k-tabstrip-wrapper').hide();
        $('.k-spreadsheet-action-bar').hide();
        $('.k-spreadsheet-scroller').hide();
        $('.k-spreadsheet-column-header').hide();
        $('.k-spreadsheet-row-header').hide();
    });

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 Nov 2018, 11:41 AM
Hi Michael,

The spreadsheet is designed for data editing, and a read only version would rather be a grid or a simple <table> that you can generate with a loop over the data.

That said, you can try hooking to its render event and calling enable(false) on all cells as done in the following KB article (it was written for the WebForms wrapper but it is still a Kendo Spreadsheet in the browsre): https://www.telerik.com/support/kb/aspnet-ajax/spreadsheet/details/load-excel-file-into-a-read-only-spreadsheet.

Here's an example I made for you based on the article above and the basic demo: https://dojo.telerik.com/@bratanov/UCukaxoz/2.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Spreadsheet
Asked by
Michael
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or