Get the height of a grid

I have a layout’s cell with grid attached to it. I want to make the cell’s height matching the height of the grid after it loads from db/xml. I know I can get the number of rows after load completes and there is a height of a row defined in css, but the numbers do not calculate to give the real height of the grid element.

Any ideas how to get the grid element’s height in pixels?

anyone?

please?

After data loading it will be

var height = mygrid.entBox.offsetHeight;

unfortunately there is no easy way to size layout’s cell to the grid.

Sorry Stanislav - I did not notice your reply before. Thank you for the answer.

However it is not exactly what I am looking. The value of entBox.offsetHeight gives me the box size. What I really need is I want to match the box size to the actual size of the grid after it loads the data.

For example, the db query returns 3 rows so I want the gridbox/layout cell (fixed height) to match the hight of grid header + 3 x row height, to be able to set it to eg. 140px. Next time the query gets 5 rows so I want the layout cell be of the height of grid header + 5 x row height etc. No scroll bars. No white space.

I was trying to get the value of grid header and row elements’ height, but no idea how to access those via DOM.

You may try to use enableAutoHeight() method.
docs.dhtmlx.com/doku.php?id=dhtm … autoheight