Resize jqGrid based on number of rows?

2020-05-30 08:40发布

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.

7条回答
我只想做你的唯一
2楼-- · 2020-05-30 09:47

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

查看更多
登录 后发表回答