In my layout i would like to put a element html (it displays my logo, profile company) to header side and grid object in one cell of layout, Is it possible to attach header and grid in one/specific cell of layout, if not how to do my above scenario.
Thank You very much for your replay, I’ve modified your code :
var layout;
function doOnLoad() { //debugger;
layout = new dhtmlXLayoutObject(document.body, "2U");
layout.cells("b").attachObject("my_header");
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../../../codebase/imgs/");
mygrid.setSkin("dhx_skyblue");
mygrid.loadXML("../../../samples/dhtmlxGrid/common/gridH.xml");
//layout.attachHeader("my_header");
}
But When i collapsed cell(“a”) there’s empty space beside the grid. What i want is my grid has the same behavior/dynamic (width, height etc) as we’re using attachgrid() method to attach grid in a cell of layout.
If is correct behaviour. Such situation will arise because you attach grid to the cell through the div.
You can try the next:
onCollapse/onExpand and onPanelResizeFinish recount manually width of the grid
use 3L pattern widthout header (hideHeader()) of the cell B and attachObject() to this cell - it will be your header (“green” div), plus setHeigth() and fixSize() added and attachGrid() to the cell C