我最近开始使用jqGrid并遇到一个问题,当将 shrinkToFit 选项设置为 true 时会导致水平滚动条。你有任何想法如何摆脱它,因为我在我的表中不需要它
这是JS代码:
$(document).ready(function () {
$(function () {
$("#list").jqGrid({
url: "example.xml",
datatype: "xml",
mtype: "GET",
colNames: ["Inv No", "Date", "Amount", "Tax", "Total", "Notes"],
colModel: [
{ name: "invid" },
{ name: "invdate" },
{ name: "amount" },
{ name: "tax" },
{ name: "total" },
{ name: "note" }
],
pager: "#pager",
rowNum: 2,
rowList: [2, 4, 6],
sortname: "invid",
sortorder: "desc",
viewrecords: true,
gridview: true,
autoencode: true,
height: "auto",
loadonce: true,
styleUI: "Bootstrap",
responsive: true,
autowidth: true,
shrinkToFit: true,
caption: "My first grid"
});
$("#list").jqGrid('navGrid', '#pager',
{ edit: false, add: false, del: false });
});
})