We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

contextMenuOpen event not firing on Linux


We are using an ejTreeGrid in a cross-platform, AngularJS application, and for some reason the contextMenuOpen event callback is not getting fired on a right-click when running on Linux.  There is no output from the callback method and the context menu never appears.  It works fine on Windows.  The create, actionComplete, rowSelecting, and rowSelected callbacks all work fine on Windows and Linux, so it seems to just be an issue with the context menu event (or perhaps some setting on Linux?).  We're testing on Linux CentOS 6.10, Kernel Linux 2.6.32-754.el6.x86_64, Gnome 2.28.2.  I've searched through the forum, and can't find any related issues.  Any help would be appreciated, thanks!

The following is our code for initializing the tree grid:

$(function () {
allowColumnResize: true,
allowMultiSorting: false,
allowSelection: true,
               allowSorting: false,
               childMapping: "children",
               columns: [
                    { field: 'type', headerText: 'Type', headerTextAlign: ej.TextAlign.Center, width: "40", textAlign: ej.TextAlign.Center, isFrozen: false, allowFreezing: false, allowEditing: false, visible: true },
                    { field: 'gridName', headerText: 'Name', headerTextAlign: ej.TextAlign.Center, width: "130", textAlign: ej.TextAlign.Left, allowEditing: false, visible: true },
                    { field: 'gridProperty', headerText: 'Property', headerTextAlign: ej.TextAlign.Center, width: "280", allowEditing: false, visible: true }
               columnResizeSettings: {
                    columnResizeMode : ej.TreeGrid.ColumnResizeMode.NextColumn
               contextMenuSettings: {
                    showContextMenu: false,
                    contextMenuItems: []
               dataSource: data.gridProperties,
               emptyRecordText: "Nothing to display.",
               enableResize: true, 
               isResponsive: true,
               selectionSettings: {
                    selectionType: "multiple",
                    selectionMode: ej.TreeGrid.SelectionMode.Row,
                    enableSelectAll: true,
                    enableHierarchySelection: true
               sizeSettings: {
                    width: "100%",
               selectedRowIndex: -1,
               treeColumnIndex: 0,
               actionComplete: treeGridCallback_ActionComplete,
               create: treeGridCallback_Create,
               collapsed: treeGridCallback_Collapsed,
               expanded: treeGridCallback_Expanded,
               recordClick: treeGridCallback_RecordClick,
               rowSelecting: treeGridCallback_RowSelecting,
               rowSelected: treeGridCallback_RowSelected,
               contextMenuOpen: treeGridCallback_ContextMenuOpen

function treeGridCallback_ContextMenuOpen( args )     // Never invoked on Linux
     console.log( "treeGridCallback_ContextMenuOpen" );     // Never output on Linux

     // Remove menu item (as an example).
          headerText: "Remove...",
          menuId: "remove",
          iconPath: "url(" + ctrlData.removeIcon + ")",
          eventHandler: function removeClicked(args) {
               ctrlData.contextClicked( "Remove" );


4 Replies

JF Jay Faulkner August 27, 2019 08:00 PM UTC

Update: Please hold off on looking at this for now.  I need to do a little more debugging on our end first.  We found that if we modify the grid by adding or removing a row, the right-click context menu begins to work again.  It's possible there is just some piece of state that is getting out of sync on our end.  I will update again once I have something more.  Thanks.

GA Gurunathan A Syncfusion Team August 28, 2019 05:30 AM UTC

Hi Jay, 
Thanks for giving update. We assure you that we will assist you if you require in your end.  

JF Jay Faulkner August 29, 2019 01:34 PM UTC


This turned out to be an issue on our end, and not an issue with the ejTreeGrid.  We were setting the model in two places, during creation and during update.  We were not initializing the context menu settings during creation, assuming our update pass would set it.  However, there was a timing issue on Linux where the update was getting skipped because the treegrid had not yet been initialized.  Sorry for jumping the gun on this.


GA Gurunathan A Syncfusion Team August 30, 2019 11:50 AM UTC

Hi Jay, 
Thanks for giving update. 
Can you please share us the more details about issue you are facing, and please share the code snippets or issue reproducible sample with replication steps. 
We would like to know how you are initializing the context menu settings in your application? And what are the customization done in your application on TreeGrid. 
It will be very helpful to analyze this issue properly and provide the solution for this. 

Live Chat Icon For mobile
Up arrow icon