left click for activate context menu

Hi,
I’m using below code to use context menu in my apps:

function doInitHeaderMenu(){

		headerMenu = new dhtmlXMenuObject();
		headerMenu.setImagePath(imagePath);
		headerMenu.renderAsContextMenu();			
		headerMenu.loadXML("test.xml");				
		headerMenu.addContextZone("header-menu");
		headerMenu.attachEvent("onBeforeContextMenu", function(zoneId){
				return true;
		});
		headerMenu.attachEvent("onClick",onGridHeaderMenuClick);
}

This code works just fine but to activate the context menu user must use right-click.
Is it possible to change it into left-click tp activate this menu? Which javascript file should I change in order to activate left-click?
thanks

dian

Hi,
You may use showContextMenu(x,y) method to open menu in a certain position. If you want to show the menu in the header of dhtmlxgrid, you may apply the following:

grid.attachEvent("onHeaderClick",function(columnIndex,e){ var x = e.clientX; var y = e.clientY; window.setTimeout(function(){ menu.showContextMenu(x,y) },1) })