Is there a way to disable the insert/remove row and column (Contextual menu) ?

Posted by: fahmii.bensalah on 16 September 2018, 10:53 pm EST

  • Posted 16 September 2018, 10:53 pm EST

    Hi,

    I would like to disable the insert and delete events of rows and columns from the sheet contextuel menu.

    Thanks,
  • Marked as Answer

    Replied 17 September 2018, 9:15 pm EST

    Hello,

    You may go through this documentation link which shows how to add/remove custom menu options in a context menu:-
    http://help.grapecity.com/spread/SpreadSheets11/webframe.html#UsingtheContextMenu.html

    You can customize your context menu further as per your need. To get the cell index of clicked cell you can use the code as given here:-
    http://sphelp.grapecity.com/webhelp/SpreadSheets10/webframe.html#scxyindex.html

    The only difference is that the code in that page is for left-clicking, so it would need to be changed a little to something like this for right-clicking:-
    https://stackoverflow.com/questions/1206203/how-to-distinguish-between-left-and-right-mouse-click-with-jquery

    Hope it helps.

    Thanks,
    Reeva
  • Replied 9 October 2019, 7:07 am EST

    ***For future help :)
    this.spread.contextMenu.menuData = this.spread.contextMenu.menuData.filter(
    i => !(i.text === 'Insert' || i.text === 'Delete'));


    ===Angular===
Need extra support?

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

Learn More

Forum Channels