Posted 7 January 2019, 2:27 am EST
Hi,
Is there a way to hide / disable the + button that allows the user to add a new sheet?
Is there also a way to remove / disable the option to remove a sheet from the context menu?
Thanks
Forums Home / Spread / SpreadJS
Posted by: guy.g on 7 January 2019, 2:27 am EST
Posted 7 January 2019, 2:27 am EST
Hi,
Is there a way to hide / disable the + button that allows the user to add a new sheet?
Is there also a way to remove / disable the option to remove a sheet from the context menu?
Thanks
Posted 7 January 2019, 7:50 pm EST
I found the answers after digging through the API, not very intuitive I must say…
For hiding the + button that allows the user to add more sheets set
spread.options.newTabVisible to false
For disabling the remove sheet functionality I found the option to remove items from the contextMenu:
I removed all the items with the name:
‘gc.spread.insertSheet’,
‘gc.spread.deleteSheet’,
‘gc.spread.hideSheet’,
‘gc.spread.unhideSheet’
(Just changed the spread.contextMenu.menuData array)
That made the contextMenu of the sheets tab strip disappear but kept the cells contextMenu
Posted 8 January 2019, 4:00 pm EST
Hello,
Thanks for sharing the code. We are glad to know that your issue has been resolved.
Regards,
Reeva