Sheet locked in ssjson allows column insert and delete

Posted by: stephen.young on 19 April 2018, 8:22 pm EST

    • Post Options:
    • Link

    Posted 19 April 2018, 8:22 pm EST

    I have an ssjson template with protection on but users can still delete and insert columns. Is there a way to protect the sheet structure?

    This is the current settings for the sheet in the ssjson file.

    
    "isProtected": true,
    "protectionOptions": {
        "allowSort": true,
        "allowFilter": true,
        "allowResizeRows": true,
        "allowResizeColumns": true
    }
    
  • Posted 20 April 2018, 1:55 am EST

    Hello,

    You can set ‘allowInsertColumns’ and 'allowDeleteColumns ’ to false for protectionOptions with locked sheet. For example:

    “isProtected”: true,

    “protectionOptions”: {

    “allowSort”: true,

    “allowFilter”: true,

    “allowResizeRows”: true,

    “allowResizeColumns”: true,

    “allowInsertColumns”:false,

    “allowDeleteColumns”:false

    }

    Thanks,

    Deepak Sharma

  • Posted 22 April 2018, 7:58 pm EST

    Hi,

    Thanks for your response. I’ve tried adding those options as above but it is not having any effect. I am using SpreadJS 11.0.6. Also, those options are not mentioned in the schema here http://help.grapecity.com/spread/SpreadSheets11/webframe.html#fullschema11.html.

    Thanks,

    Steve

  • Posted 23 April 2018, 5:15 pm EST

    Hi Steve,

    Please note that the protection options : allowInsertRows, allowInsertColumns, allowDeleteRows and allowDeleteColumns are available only when you are performing an operation on the user interface. In other words, the value will only restrict insertion and deletion of rows and columns command in the context menu.

    http://help.grapecity.com/spread/SpreadSheets11/webframe.html#celllock.html

    Thanks,

    Deepak Sharma

  • Posted 23 April 2018, 7:19 pm EST

    Hi,

    Yes, this is what I was expecting. But, the option is still there in the context menu and still removes the columns or rows. I’ve tried these options in the ssjson file and they are set correctly in the JS object and I have also tried setting in JS but with the same outcome. I’ve attached a modified version of the MVC Sample that shows the issue.

    Thanks,

    Steve

  • Posted 23 April 2018, 7:21 pm EST

  • Posted 24 April 2018, 11:54 pm EST

    Hello,

    Thank you for providing me the sample application. I can replicate the issue with this. I have informed the development team about this issue. I will let you know as soon as I get an update on this. The tracking id for this issue is 257522.

    Thanks,

    Deepak Sharma

  • Posted 25 April 2018, 5:21 pm EST

    Hi Stephen,

    This issue is fixed with our latest release of SpreadJS Service Pack1. Now the Delete option in Context menu is disabled. Please refer to the attached image.

    You can download the new build from our website.

    Thanks,

    Deepak Sharma

  • Posted 25 April 2018, 11:56 pm EST

    Thanks. I can confirm version 11.1.0 fixes the issue for me.

    Steve

Need extra support?

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

Learn More

Forum Channels