0

jqGrid has the method setGridHeight which sets the height of the grid cells only.
What I need is to set the height of the whole thing (including the pager) when the browser is resized.

Is there a way?

4

1 に答える 1

0

次のトリックでそれを行うことができます:

function setJqGridFullHeight(gridSelector,newHeight){
    $grid = $(gridSelector) ;
    $grid.setGridHeight( newHeight ) ;
    $grid.setGridHeight( 2*newHeight - $grid.closest('.ui-jqgrid').height() ) ;
}
于 2013-05-31T20:57:47.497 に答える