Disable right-click menu on FlexSheet

Posted by: megan.klein on 26 January 2022, 12:48 am EST

  • Posted 26 January 2022, 12:48 am EST

    Is there a way to turn off the right-click menu entirely (or hide certain options from within that menu) on a FlexSheet? We want to prevent users from adding/removing columns.
  • Replied 1 February 2022, 4:14 pm EST

    Hi Megan,
    For this use the following code snippet to hide the last two options.

    c1.documentReady(function(){
    document.querySelectorAll("[wj-part='context-menu']")[1].querySelectorAll(".wj-context-menu-item")[2].style.display="none";
    document.querySelectorAll("[wj-part='context-menu']")[1].querySelectorAll(".wj-context-menu-item")[3].style.display="none";
    })


    Hope it helps!

    Regards,
    Manish Gupta
Need extra support?

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

Learn More

Forum Channels