Contextual menu in empty grid

I would like to show a contextual menu in a grid whether it has results or not.

I know this has been addressed before with the following fix:

mygrid.entBox.id = “gridBody”;
menu.addContextZone(“gridBody”);

This solves the problem partially since now the menu also pops up when right clicking the headers and footer and showing up in the wrong position.

Is there a way to show the menu only if the area where the rows go is clicked?

Thanks! :mrgreen:

Please, try to use:
mygrid.objBox.id = “gridBody”;

Also you may try to use the onEmptyClick event to control the clicking on tyhe part of the grid body without data:
docs.dhtmlx.com/api__dhtmlxgrid_ … event.html