Hi,
I can’t manage to attach the “onRightClick” event to my TreeGrid without killing my context menu. If I do not attach the event, the context menu works fine, as soon as I attach the event, the event is fired but the context menu does not show up anymore.
I tried with events onRightClick and onBeforeContextMenu, the same problem. What I would like to have is when the user right clicks on a row, this row is selected and the context menu appears:
treeGridContextMenu=new dhtmlXContextMenuObject(‘120’,0,treeGridContextMenuImageFolder);
treeGridContextMenu.menu.loadXML(contextMenuXML);
treeGridContextMenu.setContextMenuHandler(onButtonClick);
repositoryTreeGrid = new dhtmlXGridObject(treeGridDiv);
repositoryTreeGrid.enableContextMenu(treeGridContextMenu)
repositoryTreeGrid.attachEvent(“onRowSelect”,doOnRowSelected);
repositoryTreeGrid.attachEvent(“onRightClick”,doOnRightClick);
repositoryTreeGrid.init();
repositoryTreeGrid.loadXML(treeStrucutreXML);
function doOnRightClick(rowId,cellInd,ev)
{
repositoryTreeGrid.selectRowById(rowId);
}
Should be:
function doOnRightClick(rowId,cellInd,ev)
{
repositoryTreeGrid.selectRowById(rowId);
return true;
}