The menu does not work and I get the below error when loading page with dhmlxMenu object attached to a Grid:
Error message: polygon is undefined
Here is my code:
i am constructing the Menu Object in below function:
function loadGridMenu() {
menuGrid = new dhtmlXMenuObject();
menuGrid.renderAsContextMenu();
menuGrid.addContextZone(‘gridbox’);
menuGrid.setIconsPath(“dhtmlx/imgs/dhxmenu_dhx_skyblue/”);
menuGrid.addNewSibling(null, “bulk”, “Bulk Action”, false);
menuGrid.addNewChild(“bulk”, 0, “own”, “Own”, false);
menuGrid.addNewChild(“bulk”, 1, “resolve”, “Resolve”, false);
menuGrid.addNewChild(“bulk”, 2, “reject”, “Reject”, false);
// Hot Keys for Menu Items
menuGrid.setHotKey("own", "Ctrl+O");
menuGrid.setHotKey("resolve", "Ctrl+R");
menuGrid.setHotKey("reject", "Ctrl+J");
}
And i call this method as a Right Click event in a Grid as below:
mygrid.attachEvent("onRightClick", loadGridMenu);