具有自动高度的jqGrid;但具有最大高度&滚动条

编程入门 行业动态 更新时间:2024-10-11 15:21:28
本文介绍了具有自动高度的jqGrid;但具有最大高度&滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有没有办法让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;但具有最大高度&滚动条

本文发布于:2023-11-09 21:19:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573466.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:高度   滚动条   jqGrid   amp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!