Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by chengshwu on Nov 24, 2008 02:03
open dhtmlx forum
how to attatch a contentMenu to a layout grid

Hi:
there is a question,I put a grid to a layout, and want add a contextMenu to the grid,but i do not know how to write the addContextZone method's parameter

var dhxLayout = new dhtmlXLayoutObject("parentId", "2E");
dhxLayout.cells("a").hideHeader();
var mygrid = dhxLayout.cells("a").attachGrid();

var contextMenu = new dhtmlXMenuObject();
contextMenu.renderAsContextMenu();
contextMenu.loadXml(dhtmlxmenu.xml");
contextMenu.addContextZone(???????);

how to write addContextZone parameter?
Answer posted by Support on Nov 24, 2008 04:46
Instead of addContextZone you can use

mygrid.enableContextMenu(contextMenu);