Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Damian Grant on Aug 04, 2008 23:43
open dhtmlx forum
Trying to figure out why header menu doesn't appear on right-click

Hi,

I seem to have encountered the same problem Danny was having:
http://www.dhtmlx.com/docs/products/kb/index.php?s=normal&q=3928

I have the pro version but try as I might, I cannot get the context menu to appear.
I have previously got it working, but on a different page.

Here's a snippet of my code:

<div id="myShowHideDiv" style="display:block;">
<link rel="STYLESHEET" type="text/css" href="dxs/dhtmlxGrid/codebase/dhtmlxgrid.css">

<style>
.dhx_header_cmenu{
background-color:#ffffff;
border:2px outset silver;
z-index:2;
text-align:left;
}

.dhx_header_cmenu_item{
white-space:nowrap;
vertical-align:middle; padding-left: 5px;
}       
</style>                                                 


<script src="dxs/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script  src="dxs/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script  src="dxs/dhtmlxGrid/codebase/ext/dhtmlxgrid_hmenu.js"></script>
<script  src="dxs/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script  src="dxs/dhtmlxGrid/codebase/excells/dhtmlxgrid_excell_ra_str.js"></script>
 
<div id="gridbox" width="510px" height="150px" style="background-color:white;overflow:hidden;border-top: solid #ffb703 1px;border-left: solid #ffb703 1px;border-right: solid #ffb703 1px;border-bottom: solid #ffb703 1px; padding: 0px;"></div>
<div id="recinfoArea" style="width:350px; background-color: #fcefcf; padding-top: 5px; padding-bottom: 5px; border-top: solid #ffb703 1px; border-bottom: solid #ffb703 1px; border-right: solid #ffb703 1px;border-left: solid #ffb703 1px;"></div>

<script>

mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("dxs/dhtmlxGrid/codebase/imgs/");
mygrid.setHeader("Date,ListName,Name,A,B,C");
mygrid.setInitWidths("60,150,150,60,60,80");
mygrid.setColAlign("right,left,left,center,center,center");
mygrid.setColSorting("date,str,str,na,na,na");
mygrid.setColTypes("ro,ro,ro,str,str,str");
mygrid.setColumnIds("1,2,3,4,5,6");
mygrid.enableAutoHeight(false,"150");
mygrid.setSkin("myownskin");
mygrid.init();
mygrid.enableHeaderMenu();
mygrid.loadXML("http://www.thedomainimusing.com/test.xml");

</script>
</div>


The xml I'm loading seems to display with no problems.

Any idea what's going on? I'm on WinXP SP2 + Firefox 3 but it also doesn't seem to work in IE7 either (at least in this case - it has worked previously for me but I don't know what I've done differently!)

Thanks in advance for your help :)

-Damian.

Answer posted by Support on Aug 05, 2008 01:59
The sample with the same code works correctly locally ( sent by email )
The main reason of problem may be problem with z-index - if you have grid placed in some container with z-index greater than z-index of header menu it will be invisible.
There is no any other known reason of problem.  

If problem still occurs for you - please try to use dhtmlxgrid_hmenu.js from provided sample.