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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

contextMenuOpen event not firing on Linux

Thread ID:





146985 Aug 27,2019 03:27 PM UTC Aug 30,2019 11:50 AM UTC AngularJS 4
Tags: ejTreeGrid
Jay Faulkner
Asked On August 27, 2019 03:27 PM UTC


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" );


Jay Faulkner
Replied On 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.

Gurunathan A [Syncfusion]
Replied On 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.  

Jay Faulkner
Replied On 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.


Gurunathan A [Syncfusion]
Replied On 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. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon