Search code examples
extjsextjs4

how to get height of a row from gridview extjs 4?


in extjs 3.3.0, i can do that like this

var row = grid.getView().getRow(0);
var height = Ext.get(row).getHeight();

but i can't find getRow() method in gridView from docs api, even in 4.0.2a
anyone know the similar one??

my goal is to reload the grid when the parent window resized. in extjs 3 i do this by get a row height (index 0), then divide the view height with the row height (with rounding). the result will become a new pagesize. finally i reload the store base on new pagesize.


Solution

  • Try:

    var row = grid.getView().getNode(0);
    var height = Ext.get(row).getHeight();
    

    I just ran into the same thing myself, it got me what I needed. I suspect I'm going through the same pain in the rear upgrade that you are right now too.

    -Mark Huber