Hello,
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 () {
$("#treeGridContainer").ejTreeGrid({
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).
args.contextMenuItems.push({
headerText: "Remove...",
menuId: "remove",
iconPath: "url(" + ctrlData.removeIcon + ")",
eventHandler: function removeClicked(args) {
ctrlData.contextClicked( "Remove" );
ctrlData.removeProperties();
}
});
}
Jay