我有jqgrid有很多数据..我想隐藏jqgrid的拇指,它在鼠标滚轮上上下滚动条..数据是动态的所以我给你基本的例子..有什么办法隐藏拇指仅jqgrid垂直滚动条?
var data = [
[48803, "DSK1", "", "02200220", "OPEN"],
[48769, "APPR", "", "77733337", "ENTERED"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
[48803, "DSK1", "", "02200220", "OPEN"],
];
$("#grid").jqGrid({
datatype: "local",
height: 250,
colNames: ['Inv No', 'Thingy', 'Blank', 'Number', 'Status'],
colModel: [{
name: 'id',
index: 'id',
width: 60,
sorttype: "int"
}, {
name: 'thingy',
index: 'thingy',
width: 90,
sorttype: "date"
}, {
name: 'blank',
index: 'blank',
width: 30
}, {
name: 'number',
index: 'number',
width: 80,
sorttype: "float"
}, {
name: 'status',
index: 'status',
width: 80,
sorttype: "float"
}],
caption: "Stack Overflow Example",
// ondblClickRow: function(rowid,iRow,iCol,e){alert('double clicked');}
});
var names = ["id", "thingy", "blank", "number", "status"];
var mydata = [];
for (var i = 0; i < data.length; i++) {
mydata[i] = {};
for (var j = 0; j < data[i].length; j++) {
mydata[i][names[j]] = data[i][j];
}
}
for (var i = 0; i <= mydata.length; i++) {
$("#grid").jqGrid('addRowData', i + 1, mydata[i]);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://trirand.com/blog/jqgrid/js/jquery.jqGrid.min.js"></script>
<script src="http://trirand.com/blog/jqgrid/js/i18n/grid.locale-en.js"></script>
<link href="http://trirand.com/blog/jqgrid/themes/ui.jqgrid.css" rel="stylesheet"/>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css" rel="stylesheet"/>
<table id="grid"></table>
更新 我正在使用4.6.0版本的jqgrid ..这只是示例忽略键以及它如何在grid中输入数据..基本问题是隐藏滚动条的拇指
UPDATE1 数据类型:json,rownum = 50,height:350,并且分页为scroll:true