Context Menu RemoveItem not Working

Good Day!

Seeking some guidance on removing Context Menu Items for jQuery ejSpreadsheet component. I reviewed the documentations and some segments in your Knowledge Base, followed how I can remove some Context Menu Items using XLCMenu.removeItem function. But for some reason, it is not working.

As of the moment we are using v15.4.0.20.

Please refer to the attached files for more details.

Looking forward on hearing from your team soon.

Regards,

Joseph

 


Attachment: Screens_accad5c.zip

1 Reply

SP Sangeetha Priya Murugan Syncfusion Team May 18, 2022 03:28 PM UTC

Hi Joseph,


Your reported issue replicated in your mentioned version (15.4.0.20), which is one of our older versions. In our later releases, we have fixed this issue. So, we suggest you to use the latest EJ1 script to resolve this issue in your end.


Code example:


<head>

    <script

    <script src=https://cdn.syncfusion.com/20.1.0.55/js/web/ej.web.all.min.js> </script>

</head>

 

function loadComplete(args) {

            var xlFormat = this.XLFormat;

            if (!this.model.isImport) {

               this.XLCMenu.removeItem(ej.Spreadsheet.ContextMenu.ColumnHeader, ["Delete", "Insert","Hide","Unhide", "ClearContents"]);

                this.XLCMenu.removeItem(ej.Spreadsheet.ContextMenu.Cell, ["Delete", "Filter", "Sort", "ctxComment", "CmHyperLink", "FormatCells","ClearContents"]);

            }

        }


For your convenience, we have prepared the sample based on our suggestion in latest version. Please find the link below.


Sample Link:  https://www.syncfusion.com/downloads/support/directtrac/general/ze/EJ1-Spreadsheet567658744


Could you please check the above links and get back to us, if you need any further assistance on this.


Regards,

Sangeetha M



Loader.
Up arrow icon