有没有办法让jqGrid自动将其高度调整为行数;但是当达到某个高度时,它的高度不能再增加,并且垂直滚动条会增加吗?
Is there any way to get jqGrid to adjust its height automatically to the number of rows; but when a certain height is reached that its height cannot increase anymore and that the vertical scrollbar apprears?
谢谢 D
推荐答案我建议您在 bdiv 并使用height:'100%'或height:'auto':
$("#list").parents('div.ui-jqgrid-bdiv').css("max-height","300px");"max-height"属性将为未被IE6使用,但最近的网络浏览器将使用它.
The "max-height" property will be not used by IE6, but more recent web browsers will use it.
更新:免费的jqGrid在4.10.0版中引入了新属性:maxHeight,其作用与上述完全相同.因此,人们可以只使用maxHeight: 300而不是手动设置父div.ui-jqgrid-bdiv的max-height.
UPDATED: Free jqGrid introduce in version 4.10.0 new property: maxHeight which do exactly the same as above. Thus one can just use maxHeight: 300 instead of manual setting of max-height of the parent div.ui-jqgrid-bdiv.
更多推荐
具有自动高度的jqGrid;但具有最大高度&滚动条
发布评论