Hi,
I just need to display one item in context menu (edit) and here is my code
menu = new dhtmlXMenuObject(null, “standard”);
menu.setImagePath("…/…/…/includes/dHTMLX/codebase/imgs/");
menu.renderAsContextMenu();
menu.setOpenMode(“web”);
menu.attachEvent(“onClick”, onButtonClick);
menu.loadXML("<?xml version='1.0' ?>");
I attached the context menu to treeGrid
mygrid1.enableContextMenu(menu);
but I am getting an error “Incorrect XML”. I don’t want to use the XML file to load contextMenu. Please suggest.
Cotext menu in such case is a instance of dhtmlxMenu. You can use any available dhtmlxMenu API method for the variable “menu”.
To load menu from the xml string you should use method menu.loadXMLString("<?xml version='1.0' ?>").
You can find more information about data loading in dhtmlxMenu here dhtmlx.com/docs/products/dhtmlxM … menu_vxak0