SpreadSheet: Disable the context menu

Hi,

I use the spreadsheet a lot so that my clients can easily modify their prices, discounts, etc., thanks to the possibilities of the spreadsheet.

But in this context of use, I need to limit the actions of customers. For example, the spreadsheet context menu is very annoying for me, because it allows you to unblock cells, change sorting, etc., which can cause problems.

For example, a column in the spreadsheet serves as an identifier for the row (Product number). This column should therefore not be changed and is locked. But with the context menu, the customer can unlock it and change this number.

Worse, with the context menu on column and row headers, the client can insert and delete columns and rows, which breaks saving certain cells/columns on the server, and cause other problems.

Is it possible to disable the context menu? or certain lines of this menu?

Thank you.

Olivier

Translated with DeepL Translate: The world's most accurate translator

Hi @olivier

to get the context menu you can use:

var menu = $$("sheet").$$("context")

To remove it at all:

menu.destructor()

Also, you can attach onBeforeShow event and prevent showing menu (return false;), disable (menu.disableItem("clear");) or hide menu items (menu.hideItem("sort");).

Example: https://snippet.webix.com/aipviiay

Another possibility is to add your own menu:

Example: https://snippet.webix.com/u14byedd

Wow! Thank you Dima!