auto height

Hi,
I have a page with two frames. At the top frame there is a formular where the user could enter some information. at the bottom frame there is a dhtmlxGrid.

The top frame has a fixed size, the bottom frame is variable.

Now I want that the grid fills the complete bottom frame. For this I can take these lines:

mygrid.enableAutoWidth(true); mygrid.enableAutoHeight(true); mygrid.setSizes();

If the bottom frame has a height of 150px and the grid hast 40 rows then the grid gets an autosize of 200px for example. So the grid is larger than the botton frame, so the frame gets a scrollbar.

the problem is, if I use the scrollbar then the columns scroll with the content, so I can’t see them anymore.

is there a way to set the max-height of the the grid, so that the grid handle the vertical scrolling and not the frame?

thank you.

hibbert

enableAutoHeight() method have several parameters.
http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_enableautoheight
One of them is maxHeight, which sets maximum height of the grid before scrolling appears.
so you need just to add this parameter to this method in your code.
For example:

mygrid.enableAutoHeight(true,150);

The same thing is also with enableAutoWidth() method:
http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_enableautowidth