jqGrid的shrinkToFit会导致水平滚动条出现

时间:2016-08-04 10:44:28

标签: jquery html jqgrid scrollbar shrink

我最近开始使用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 });
    });
})

And here's the screenshot of unwanted scrollbar

0 个答案:

没有答案