Changing grid height in split mode | Issue

Hi,

I am having issues resizing a grid relative to a window when split mode has been enabled.

I am able to resize the grid width using dhtmlxGrid._fake._correctSplit(), but once the height has been set, it remains at the height set during initialization.

Note that the resize of the grid height works fine when the grid is not split using the splitAt function (using $(’#gridbox’).height(h);).

Is this intended behavior of the grid in this mode, or is there a function that exists that will permit a change in height when in split mode?

Thanks,
David

Following up with this post to see if there is a solution for this sizing issue?

In split mode, the structure of grid’s container is more complicated, and direct change will not work as you wish. You can have layout like next

<div id="gridsize" style='width:100px; height:100px'>
     <div id="gridbox" style='width:100%; height:100%'></div>
</div>

Now you can init the grid in #gridbox, and when necessary to change size you can just change styles of #gridsize and call grid.setSizes() to readjust grid to the new sizes. It must work in both normal and split modes.

Thank you Stanislav - this works perfectly now. :slight_smile: