How to prevent row delete or insert in spreadsheet?

Dear Developer,

May I know, Is there a possible way to prevent row delete or insert in a spreadsheet?
I am using like this:
onRowOperation:(id) => {
if(id == "del" || id == "add"){
return false;

It is now working.




  • edited June 9

    Hello @NaingOo ,
    In such case, you can redefine the context menu itself via the onContextMenuConfig event handler and catch the "onCommand" event of the Spreadsheet widget and assign custom functions to every command . The event is used by Spreadsheet inner logic as well, so you have to check the id of the command, which should correspond to menu item id.
    Here's the snippet:

    As alternative solution, you can access Spreadsheet's context menu via its inner id ($$("context")) and disable/remove items that are present within it:

    Using disableItem to make certain items unclickable (disabled):;
    Removing items altogether via the remove() method:;

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion