How do I attach a context menu to the grid body?
Hello Everybody!
Is it possible to attach a "oncontextmenu" event to the grid body?
I have a grid with a height of 500px. In the upper half of the grid some rows are visible and the lower half is empty. Now I attached a contextmenu to the rows with:
As expected the contextmenu appears when I right click while I'm over a row.
Now the same should happen if I right click in the lower half of the grid where no rows are shown.
What is the trick?
Thank you for helping.
Best regards.
Is it possible to attach a "oncontextmenu" event to the grid body?
I have a grid with a height of 500px. In the upper half of the grid some rows are visible and the lower half is empty. Now I attached a contextmenu to the rows with:
var rowt = new Active.Templates.Row;
rowt.setEvent("oncontextmenu", function(event){this.action("menu")});
grid.setTemplate('row', rowt);
As expected the contextmenu appears when I right click while I'm over a row.
Now the same should happen if I right click in the lower half of the grid where no rows are shown.
What is the trick?
Thank you for helping.
Best regards.
Dietrich
November 3,