dhtmlxMenu as contextMenu attached to a layout's cell

I’m trying to attach a context menu to a layout’s cell in order to have a callable context menu for the whole cell and not a part of it.



Indeed, this cell already has a tree component attached to it but, as this tree doesn"t fill it completely, a context menu attached to tree is not callable on any part of the cell.



Any way to attach a context menu to a cell ?


You can try to use the following approach to attach context menu to whole cell:


dhxLayout.cells(“a”).id = “menuzone”;



var menu = new dhtmlXMenuObject();
menu.setImagePath(…);
menu.setIconsPath(…);
menu.addContextZone(“menuzone”);
menu.renderAsContextMenu();
menu.loadXML(…);






The solution provided works but have a flaw.
ContextMenu is Y offseted if you have a  main body scrollbar not on zero position .

In fact, Attached component in any layout cell should  fill cell vertically.
So, context menu call event could be launched  in the entire cell.

The issue wasn’t reproduced with the latest version of the components. Please, have a look at the attached sample
layout_cmenu.zip (78.5 KB)

Indeed, the issue does not reproduce exactly as mine but if you set scrollbar of the cell not on zero position and call context menu, you get same y offset.
Have a look at the attached images which shows it clearly.

contextMenu_OffsetBug.rar (19.8 KB)

The issue is confirmed. We will send you the fix when it is ready (maximum in few days).


Please, send us the real demo of your layout to support@dhtmlx.com. We’ll make the menu position correction specially for it.