我有大量的数据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..这只是一个例子忽略键,以及它如何在网格中输入数据..基本问题是隐藏滚动条的拇指
分页1datatype:json,rownum=50,height:350分页为scroll:true
1条答案
按热度按时间p5fdfcr11#
如果高度不足以显示所有行,那么它必须创建一个滚动条。如果要删除滚动条,请增加高度或减少行数。