有没有可能让jqGrid插入垂直滚动条,而不是在从分页器请求新行时增加其高度?
我的当前代码如下:
$("#grid").jqGrid({
url:'/someUrl',
datatype:"json",
mtype:'GET',
shrinkToFit:true,
forceFit:true,
autowidth:true,
altRows:true,
cellEdit:true,
altclass:'altRowClass',
multiselect:true,
rowNum:15,
height:300,
rowList:[15, 50, 100, 1000],
rowNum:15
});
$('.ui-jqgrid .ui-jqgrid-bdiv').css({ 'overflow-y': 'scroll' });
- styfle<style type="text/css">.ui-jqgrid .ui-jqgrid-bdiv { overflow-y: scroll }</style>
。声明性CSS比在<table>
上设置style
属性更快。一般来说,结果应该是相同的。 - Oleg