Hide/UnHide rows and columns when sheet isProtected

Posted by: davide.vago on 29 January 2020, 10:02 pm EST

  • Posted 29 January 2020, 10:02 pm EST

    Good morning/afternoon

    I'm reaching you as follow up of the previous post: https://www.grapecity.com/forums/spread-sheets/missing-options-when-prote#hi-davide-just-to-note-the

    I've been using the sample you wrote within that post to lock the first row of a sheet instance, however I'm still thinking that the hide/unhide options are bugged.

    In fact, even if I do select a row which doesn't contain locked cells I still unable to hide/unhide the selection.

    I'm wondering if the option for enabling the hide/unhide feature exists but is just missing from the documentation. ref. https://www.grapecity.com/spreadjs/docs/v13/online/celllock.html

    Also, I found a typo inside the documentation, search for: allowDargInsertRows

    I need to find a way to lock the first row but maintain the hide functionality.
  • Replied 30 January 2020, 6:15 pm EST

    Hi Davide,

    Upon further investigation, we are able to replicate the issue and hence we have forwarded it to the dev team to look into. Till then, you may rename the hide/unhide commands to fix the issue. Please refer to the following code snippet and the sample demonstrating the same:
    spread.contextMenu.menuData.forEach(menuItem => {
    switch (menuItem.name) {
    case "gc.spread.hideRows":
    menuItem.name = "hideRows";
    case "gc.spread.unhideRows":
    menuItem.name = "unhideRows";
    case "gc.spread.hideColumns":
    menuItem.name = "hideColumns";
    case "gc.spread.unhideColumns":
    menuItem.name = "unhideColumns";


    >> Also, I found a typo inside the documentation
    Thank you for reporting, we have forwarded it to the concerned team for the fix.

    Following the internal tracking ID for escalations:
    • hide/unhide issue: SJS-3289
    • typing mistake in docs: SJS-3290

  • Replied 10 September 2020, 4:50 am EST

    Hi Davide,

    I have an update regarding your two cases:
    -- Hide/Unhide issue: Hiding or unhiding a row/column is not an option that can be enabled when protecting a sheet, this is the same with Excel. However, I did notice that Shared had provided a sample that shows you are able to accomplish this with SpreadJS's Protected sheets on unlocked cells by renaming the the hide/unhide commands

    -- Typing mistake in docs: The mistake in our documents has been fixed, you can see here: https://www.grapecity.com/spreadjs/docs/v13/online/celllock.html


Need extra support?

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

Learn More

Forum Channels