Categories | Question details Back To List | ||||||||
Grid position in layout - always top left I've simplified this as much as possible but still can't get it to work, I see the a, b and c for the layout panes in the place I expect them but then the grid which I attach to c always overlays everything and is positioned at the top left of the doc body. <html> <head> <link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.css"> <link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxlayout/codebase/dhtmlxlayout.css"> <link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxwindows/codebase/dhtmlxwindows.css"> <link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxwindows/codebase/dhtmlxwindows_dhx_blue.css"> <link rel="stylesheet" type="text/css" href="../dhtmlx/dhtmlxlayout/codebase/dhtmlxlayout_dhx_blue.css"> <script src="../dhtmlx/dhtmlxwindows/codebase/dhtmlxcommon.js"></script> <script src="../dhtmlx/dhtmlxwindows/codebase/dhtmlxwindows.js"></script> <script src="../dhtmlx/dhtmlxlayout/codebase/dhtmlxlayout.js"></script> <script src="../dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script> <script src="../dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script> </head> <script> function doOnLoad() { var dhxLayout = new dhtmlXLayoutObject(document.body, "3T", "dhx_blue"); dhxLayout.cells("a").setHeight(80); dhxLayout.cells("b").setHeight(600); dhxLayout.cells("c").setHeight(600); dhxLayout.cells("a").setWidth(1000); dhxLayout.cells("b").setWidth(300); dhxLayout.cells("c").setWidth(700); var mygrid = dhxLayout.cells("c").attachGrid(); mygrid.setImagePath('../dhtmlx/dhtmlxGrid/codebase/imgs/'); mygrid.setHeader("1,2,3"); mygrid.setInitWidths("25,100,100"); mygrid.init(); } </script> <body onload="doOnLoad()" style="width:100%; height:100%; margin:0px; overflow:hidden;"> </body> </html> Answer posted by Support on Dec 11, 2008 06:15 Yes, this is a default behaviour, because your grid is less than layout's cell, in the other case scroll will appear. Answer posted by Bob Palin on Dec 11, 2008 06:52 I don't understand - surely the grid should appear at the top left of cell "c" not the top left of the whole document? Answer posted by Support on Dec 11, 2008 08:20 Its all ok on our side, top-left of cell "c". Here is a demo: (Note: you forgot to attach dhtmlxgrid_dhx_blue.css file) Attachments (1)
Answer posted by Bob Palin on Dec 11, 2008 09:02 Aha - it was the blue skins - I had omitted the /skins part of the path to the blue CSS files, Firefox silently ignored the failure where IE just failed (showing just the 'a' cell) with no indication of what the problem was. Thanks for the example - it gave me the hint I needed. |