Missing options when protecting sheets + conflicts between existing ones

Posted by: davide.vago on 16 January 2020, 8:25 am EST

    • Post Options:
    • Link

    Posted 16 January 2020, 8:25 am EST

    Good morning/afternoon.

    I’m currently trying to solve the lack of watermark functionality within my spreadsheet instance [1] adding few new lines at the bottom of a sheet instance and using the isProtected option with locked ranges.

    Unfortunately it seems like [2]:

    • there is no way to enable/disable the hide/unhide functionality.
    • whenever i set allowSelectLockedCells to false the option disable automagically the Insert/Delete options within the context menus

    this is the testing setting

    protectionOptions: {
                allowDeleteRows: true,
                allowDeleteColumns: true,
                allowInsertRows: true,
                allowResizeRows: true,
                allowInsertColumns: true,
                allowResizeColumns: true,
                allowDargInsertRows: true,
                allowDragInsertColumns: true,
                allowSelectLockedCells: false,
                // allowSelectUnlockedCells: true,
                allowSort: true,
                allowFilter: true,
              },
    

    refs

    [1] https://www.grapecity.com/forums/spread-sheets/inject-watermarks-or-addit

    [2] https://www.grapecity.com/spreadjs/docs/v13/online/celllock.html

  • Posted 17 January 2020, 5:05 am EST

    Hi Davide,

    Please refer to the following sample which demonstrates how we could add additional cells during excel export and let us know if you face any issues:

    https://codesandbox.io/s/spread-js-starter-k0dd8

    Regards

    Sharad

  • Posted 17 January 2020, 5:50 am EST

    Thanks for the example, just to note: the 3 watermark rows at the bottom of the spreadsheet are not protected so the user can easily modify them without problems.

    Please also verify the second point of the first post which seems to be a bug within the library

  • Posted 20 January 2020, 6:27 am EST

    Hi Davide,

    just to note: the 3 watermark rows at the bottom of the spreadsheet are not protected

    In the shared sample, if you export the sheet by clicking the “Export with Watermark” button, then the 3 watermark rows are supposed to be locked and MS Excel should display an error when trying to edit those rows. Please let us know if you are observing any different behaviour with the sample.

    Please also verify the second point of the first post which seems to be a bug within the library

    This behaviour is by design, when we right-click on the row header to open the context menu, then first the whole row is selected and then the context menu is displayed for the whole row. Now if any cell in the row is non-selectable(locked and allowSelectLockedCells is set to false), then the row can’t be selected, due to which insert/delete options would be disabled.

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels