我正在处理jquery jqgrid插件。在这个网格中,我有100万条记录,并使用
编辑:我的jqGrid版本是:
scroll: 1
选项。同时,我的网格中有rowNum: 10
选项。但是只有前10行在网格中显示,垂直滚动条消失了。在标题中,我有“从1,000,000中显示1-10”的字符串。这意味着总数计算是正确的,但我不知道为什么滚动条消失了。有人能帮我解决这个问题吗?编辑:我的jqGrid版本是:
4.6.0
。以下是我的javascript代码: $(document).ready(function() {
var colModel = [
{name: "id", width: 200, align: "center", searchoptions: {clearSearch: false}, hidden: true, hiddenlg: true},
{name: "ordernumber", width: 200, align: "center", searchoptions: {clearSearch: false}},
{name: "customer.fname", width: 200, align: "center", searchoptions: {clearSearch: false}},
{name: "customer.lname", width: 200, align: "center", searchoptions: {clearSearch: false}},
];
$("#list").jqGrid({
url: "/orders/listGrid",
datatype: "json",
mtype: "POST",
colNames: ["", "1", "2", "3"],
colModel: colModel,
pager: "#pager",
rowNum: 10,
rowList: [10, 20, 30],
viewrecords: true,
multiSort: false,
gridview: true,
autoencode: true,
shrinkToFit: false,
autowidth: true,
scroll: 1,
direction: "rtl",
height: 230,
caption: "Test",
hidegrid: false,
ajaxGridOptions: {
contentType: "application/json; charset=utf-8"
},
serializeGridData: function(data) {
return JSON.stringify(data);
},
});
});
这是我的 HTML 代码:
<table id="list"></table>
<div id="pager"></div>
height
选项,并将其设置为除"auto"
和"100%"
以外的其他值?例如,尝试指定height: 230
,这足以显示标准文本的10行。您能否发布更多关于您所做的事情的信息?您使用的jqGrid版本是什么?问题只存在于某些特定版本的jqGrid中吗? - Oleg