jqGrid 在搜索中仅显示"IsNull"和"Is Not Null"选项



我正在使用jqGrid 4.15.6-prelocal数据类型。我已经启用了multipleSearch: true但我只得到"IsNull"和"不是空"作为搜索选项。下面是我的代码

$("#dataGrid").jqGrid({
datatype: "local",
data: mydata,
colNames: ['Student_ID', 'STATUS', 'TYPE', 'DESCRIPTION', 'COPIES'],
colModel: [
{ name: 'Student_ID', index: 'Student_ID', width: 80},
{ name: 'STATUS', index: 'STATUS', width: 160 },
{ name: 'TYPE', index: 'TYPE', width: 180 },
{ name: 'DESCRIPTION', index: 'DESCRIPTION', width: 180 },
{ name: 'COPIES', index: 'COPIES', width: 180 }
],
pager: '#pagingGrid',
sortname: 'Student_ID',
gridview: true,
rownumbers: true,
viewrecords: true,
loadonce: true,
gridview: true,
sortorder: "desc",
caption: 'Just simple local grid',
height: '100%'
});
$("#dataGrid").jqGrid('navGrid', '#pagingGrid', { edit: false, add: false, del: false }, {}, {}, {}, { multipleSearch: true, closeAfterSearch: true });

听起来很奇怪。你能提供重现问题的演示吗?我想你包含了错误的JS文件。例如,查看演示https://jsfiddle.net/OlegKi/4o5hsyba/,它演示了在免费 jqGrid 中搜索对话框的典型用法。所有搜索选项都正确显示。通常,可以在colModel的每个列定义中定义soptsearchoptions属性数组,或者设置通用的默认sopt值。以这种方式,您可以将搜索选项的默认列表替换为另一个列表(例如两个选项"IsNull"和"Is Not Null"(。

相关内容

最新更新