This is a migrated thread and some comments may be shown as answers.

remove right click menus in kendo

4 Answers 965 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Hema
Top achievements
Rank 1
Hema asked on 24 Mar 2016, 01:23 PM
How do I remove menus that appear when you right click on the spreadsheet widget.

4 Answers, 1 is accepted

Sort by
0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 24 Mar 2016, 02:49 PM
Hi Hema,

Currently, there are no configuration options which will disable the context menu.  However, the developers are considering adding the feature in future releases.  I recommend sharing your idea in our Feedback Portal.

Regards,
Patrick
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
serge
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 07 Jul 2022, 03:06 PM

how do we remove only one menu ?
Patrick | Technical Support Engineer, Senior
Telerik team
commented on 07 Jul 2022, 07:44 PM

By utilizing the remove method from the Kendo UI Spreadsheet's contextmenu, an item can be detached:

JavaScript

    $(function() {
        var spreadsheet = $("#spreadsheet").kendoSpreadsheet().data("kendoSpreadsheet"),
            cellContextMenu = spreadsheet.cellContextMenu();

      
      //use a selector to remove a particular item
      cellContextMenu.remove($("ul.k-spreadsheet-cell-context-menu li[data-action='merge']"));
      
      //removes the unneeded separator
      cellContextMenu.remove($("ul.k-spreadsheet-cell-context-menu li.k-menu-separator"));
    });

Please take a look at the following Progress Kendo UI Dojo with the implementation above.

0
Alex
Top achievements
Rank 1
answered on 10 Apr 2016, 03:09 PM

This worked for me

$(".k-context-menu").remove();

0
Adel Chenni
Top achievements
Rank 1
answered on 13 May 2016, 06:25 PM

This worked for me, add the below to your style tag

    .k-animation-container {
        visibility: hidden;
    }

2
Jack
Top achievements
Rank 2
Iron
answered on 13 Sep 2016, 07:23 AM

 In my opinion, the following is more predictable:

$('#spreadsheet').find('.k-spreadsheet-fixed-container').off('contextmenu');

John
Top achievements
Rank 2
Iron
commented on 21 Dec 2023, 01:17 AM

I know I'm replying to an old post, but this worked perfectly for me. Thanks.
Tags
Spreadsheet
Asked by
Hema
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Alex
Top achievements
Rank 1
Adel Chenni
Top achievements
Rank 1
Jack
Top achievements
Rank 2
Iron
Share this question
or