Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jayeff Land on Dec 12, 2008 07:42
open dhtmlx forum
TreeGrid and IFrame resizing

Hi, I am having problem resizing the dhtmlxtreegrid inside an IFrame. I have a Html page with a header, an accordion control on the left pane and 2 IFrames (1 on the upper section and one on the lower section). Each IFrame control contains the dhtmlxtreegrid. The treegrid in the upper section can go to 50 parents containing 7 levels of childs. So when I am expanding the 7 levels for the 50 parents, the IFrame overlap the control.
I would like to know if there is an “InnerResize” function of the treegrid or a similar function so the control will follow the IFrame resizing.

Thanks
Answer posted by Support on Dec 12, 2008 07:52
If grid  control was initialized in container, which has height of width defined in percents - the grid ( tregrid ) will update its size after window resize ( each time when "resize" event will be catched ) 
Also , you can update grid container manually as

var box = grid.entBox; //get container of grid
box.style.height=....; //set new height
grid.setSizes();  //update grid sizes

Answer posted by Jayeff Land on Dec 12, 2008 08:09
...Wow! Simple....and is it possible to get rid of the treegrid scrollbar easily?
Answer posted by Support on Dec 12, 2008 09:17
Grid can be used in auto-size mode ( grid.enableAutoHeight, grid.enableAutoWidth ) 
In such mode grid adjust its sizes to prevent vertical|horizontal scrollbar