How to disable default context menu?

Posted by: arnoldbendaa on 15 June 2018, 6:15 am EST

    • Post Options:
    • Link

    Posted 15 June 2018, 6:15 am EST

    Hello .

    I am going to be disable the default context menu in spreadjs.

    spreadSheetElement = angular.element(document.querySelector(‘#spreadSheet’));

    spreadSheetElement.bind(‘contextmenu’, function(e) {

    e.preventDefault();

    }

    But when click right button in spread sheet, I can show 2 context menu.

    How can I disable the default menu?

  • Posted 20 June 2018, 2:31 am EST

    Hello,

    To disable Spread’s built-in context menu, you could use

    spread.options.allowContextMenu = false;
    

    Here is the link for the same:-

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

    And to disable the system’s context menu your code is enough.

    Hope it helps.

    Thanks,

    Reeva

  • Posted 20 June 2018, 11:04 am EST

    Thanks a lot.

  • Posted 21 June 2018, 5:46 am EST

    Hello,

    We are glad to know that your issue has been resolved.

    Thanks,

    Reeva

Need extra support?

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

Learn More

Forum Channels