Hey Guys,
I am trying to add a context menu to the dhxFolders object. I didn’t find any samples for doing it but assumed it was the same setup as for the dhxGrid. When I run it, the menu does appear but it gets overlapped by the default browser context menu on right click.
Do you have sample code that I can compare?
Rgds,
Ritchie.
Hello,
Folders don’t support conent menu. But you can can try to use the following approach to add dhtmlxmenu as a context menu:
menu = new dhtmlXMenuObject(null,“standard”);
menu.setImagePath(“codebase/imgs/”);
menu.renderAsContextMenu();
…
myFolders = new dhtmlxFolders(“folders_container”);
…
document.getElementById(“folders_container”).oncontextmenu = function(e){
var ev =(e||event);
ev.cancelBubble = true;
menu.showContextMenu(ev.clientX,ev.clientY)
return false;
};
menu.attachEvent(“onClick”, function(id){
var folderId = folder.contextID;
…
}