View Full Version : How can I calculate the grid's total height?
Hi,
How can I calculate the grid's total height?
The grid's total width can be calculated using: colModel.getTotalWidth();
Is there also a method getTotalHight()?
Thanks,
Maya
ToNiC
7 Jul 2007, 11:11 AM
You can get the grids container height by grid.container.getHeight()
OR
To get the grid's DOM height, you can try: Ext.get('grid-ref').dom.clientHeight
Thanks for your reply, but I am looking for the total row height sum.
If I use the grid div's height, or its container div's height, I get only the height of the grid's borders (e.g., height=200px). BUT - if the rows total height is larger than 200px, they are scrolled vertically. In this case I can't know their real height sum (e.g., 400px) - only the height seen on the screen (200px).
Any ideas?
ToNiC
7 Jul 2007, 11:42 AM
Ohh I see what your saying now.
Something about scrollHeight and scrollTop comes to mind
Edit: Looks like if you can get the reference to the scrollbar of the grid you can get the height by: Ext.get('scroll-ref').dom.scrollHeight
Isn't there something in Ext equivalent to cm.getTotalWidth()?
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.