Context menu & layout panel blank space

I have an application based on layout - 3 panels.
One of the panels has an attached grid and an attached context menu.
The attachment of the context menu to the panel creates a blank space at the base of the panel (below the grid) the height of a normal menu.
This impacts the asthetics of the layout.
Is there a fix for this?

Attach a screenshot, please.
And we need your code to see your building structure.
Do you use method renderAsContestMenu?

Hi,

Below is an extract from the code and I have attached a screendump of the layout.
Thanks

function init_layout()
{
dhxLayout = new dhtmlXLayoutObject(“register_layout”, “3U”, “dhx_blue”);
dhxLayout.cells(“a”).setText(“Structure”);
dhxLayout.cells(“b”).setText(“Data”);
dhxLayout.cells(“a”).setWidth(300);
dhxLayout.cells(“c”).setHeight(150);
dhxLayout.cells(“c”).hideHeader();
display_tree(show_archive);
dhxLayout.cells(“c”).attachURL(“blank.php”);
bar_a = dhxLayout.cells(“a”).attachToolbar();
bar_a.setIconsPath(“…/js_toolbar/codebase/images/”);
bar_a.loadXML(“…/js_toolbar/codebase/dhtmlxtoolbar_wins.xml?”+new Date().getTime());
bar_a.attachEvent(“onStateChange”, function(id, state)
{


}


}

function grid_display(url,location,study_type,grid_row_number)
{
menu1 = dhxLayout.cells(“b”).attachMenu();
menu1.renderAsContextMenu();
menu1.setIconsPath(“…/js_menu/codebase/imgs/dhxmenu_dhx_blue/”);
menu1.attachEvent(“onClick”, on_grid_menu);
menu1.loadXML(“…/js_menu/codebase/grid_menu.xml?e=” + new Date().getTime());

     if(location=='b')
    {
        mygrid = dhxLayout.cells("b").attachGrid();
    }
    if(location=='c')
    {
      mygrid = dhxLayout.cells("c").attachGrid();
    }
  mygrid.setImagePath("../imgs/");
  mygrid.setHeader("user_id,study_id,node_id,sort_id,*,Hazard,Hazard Scenario, Cause, Consequnce, Risk Potential,#cspan,#cspan,#cspan,Barriers,#cspan,Residual Risk,#cspan,#cspan,Comments,Action Details,#cspan,#cspan,party_tag,date,Response,Comments,Aggregation Category");        mygrid.attachHeader("#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,Type,L,C,Risk,Preventive,Mitigating,L,C,Risk,#rspan,No,Status,Actions,#rspan,#rspan,#rspan,#rspan,#rspan");        mygrid.setInitWidths("0,0,0,0,18,140,140,140,140,80,30,30,30,140,140,30,30,30,140,30,50,160,0,0,0,0,140");

mygrid.setColAlign(“left,left,left,left,left,left,left,left,left,left,middle,middle,middle,left,left,middle,middle,middle,left,middle,middle,left,left,left,left,left,left,left,left,left,left,left,left”);
mygrid.setColTypes(“ed,ed,ed,ed,ro,txt,txt,txt,txt,coro,ro,ro,ro,ro,ro,ro,ro,ro,txt,ro,ro,ro,ro,ro,ro,ro,coro”); mygrid.setColSorting(“str,str,str,int,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str”);
mygrid.setStyle(“background-color:#E6E6FA”);
mygrid.enableAlterCss(“even_row”,“odd_row”);
mygrid.enableMultiline(true);
mygrid.enableEditEvents(true,false,false);
mygrid.enableContextMenu(menu1);
mygrid.init();
//disable mouse right click default context menu
dhtmlxEvent(mygrid.entBox,“contextmenu”,function(e){
(e||event).cancelBubble = true
return false;
})
mygrid.load(url);
mygrid_myDataProcessor = new dataProcessor(“…/js_dataprocessor/codebase/register_update.php”);
mygrid_myDataProcessor.setUpdateMode(“cell”);
mygrid_myDataProcessor.init(mygrid);
mygrid.attachEvent(“onRowSelect”,doOnRowSelect);
mygrid.attachEvent(“onEditCell”,doOnEditCell);
mygrid.attachEvent(“onRowDblClicked”,doOnRowDblClicked);
mygrid.attachEvent(“onXLE”, doOnLoadEnd);
mygrid.attachEvent(“onBeforeContextMenu”,pre_menu1);
mygrid.enableTooltips(“false,false,false,false,false,false,false,false”);




}


Hi

menu1 = dhxLayout.cells(“b”).attachMenu();
menu1.renderAsContextMenu();

do not use dhxLayout.cells(“b”).attachMenu() if you plan to use menu as context menu, just create new menu instance by calling new dhtmlXMenuObject()

if this will not help - please provide completed demo including all corresponding js/css files or direct link

Hi,
that is how I originally created the menu but it would no show on the grid. The only way I could get the context menu to show on the grid ws to attach it to the layout panel containing the grid.

Please, clarify your working/not working approaches.

The code extracts are listed above.