Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by techtigre on Mar 26, 2009 11:16
open dhtmlx forum
dhx grid inside dhx layout

I have a 2 pane layout with a grid object in the bottom portion. I notice that when i allow "resizing" on the layout , the grid object does NOT stretch to fill out the additional area in the new layout size. BUT when I do an F-11 fullscreen , the grid object correctly fills the newly resized layout without any whitespace. Any suggestions as to how to make the grid do this?
Answer posted by Alex (support) on Mar 27, 2009 07:37

We have tested the latest layout and grid. 

var dhxLayout = new dhtmlXLayoutObject("parentId", "2E");
var dhxGrid = dhxLayout.cells("b").attachGrid();
...

The grid is resized when we change the height of the layout cell. 

Please, provide the sample to reproduce the issue. 

Answer posted on Mar 27, 2009 07:45
It seems when i use the syntax : dhxLayout.cells("b").attachObject(gridId);   I get the error I was describing.  I switched to using the code you suggested: var dhxGrid = dhxLayout.cells("b").attachGrid();
The problem is resolved.  So basically, to reproduce the problem, create an explicit  grid like so:  myGrid= new dhtmlXGridObject("gridBox_divId"); and then attach it to a layout in this fashion:
dhxLayout.cells("b").attachObject(gridBox_divId);  Nevertheless, your solution works for my needs thanks!



Answer posted by Alex (support) on Mar 27, 2009 08:04

attachObject isn't applied to the component inside it. 

So, usage of attachGrid is more correct in this case.