Resize jqGrid based on number of rows?

Rosdi Kasim picture Rosdi Kasim · Dec 29, 2009 · Viewed 26.6k times · Source

I want my jqGrid to shrink and expand based on the number of rows it has. Let say it currently has 10 rows, the height of the jqGrid will shrink to 10 rows (so that no gaping empty rows is exposed).

If however there are too many rows, the height of the grid will expand to a maximum 'height' value and a scroll bar will appear.

Answer

Craig Stuntz picture Craig Stuntz · Dec 29, 2009

That's built into the grid. You set height to 100%. There's a demo on this page if you go "Advanced -> Resizing.