在这里,我遇到了一种情况,即我必须对当前加载到网格中的数据进行工具栏过滤(客户端过滤),同时,我应该能够在服务器上进行多次搜索边。这可能吗?有什么解决办法吗?这是我的网格定义。
grid_on_facilities.jqGrid({
url: 'OffOnFacilitiesDataJson',
datatype: "json",
colNames: ["id", "Orig Loc-CLLIA", "Term Loc-CLLIZ", "Fac,Equip or Cbl Name",
"Fac or Cbl Type\/Relay Rack", "Unit/Pair", "SUBD or Cbl BP", "Frame/MDF"],
colModel: [
{name: 'id', index: 'id', width: 1, hidden: true, hidedlg: true, key: true,
searchoptions: {sopt: ['eq', 'ne']}},
{name: 'orig_loc_cllia', index: 'orig_loc_cllia', width: 350,
hidedlg: true, editable: true, fixed: true},
{name: 'term_loc_clliz', index: 'term_loc_clliz', align: "right",
editable: true, width: 180, fixed: true},
{name: 'fac_equip_or_cbl_name', index: 'fac_equip_or_cbl_name',
align: "right", editable: true, width: 100, fixed: true}
],
sortable: true,
rowNum: 10,
rowList: [2, 5, 10, 20],
pager: '#pager_on_facilities',
gridview: true,
sortname: 'orig_loc_cllia',
viewrecords: true,
sortorder: 'desc',
caption: 'OffOn facilities',
autowidth: true,
editurl: 'OffOnFacilitiesDataJson',
jsonReader: {
repeatitems: false,
root: function (obj) { return obj; },
page: function (obj) { return 1; },
total: function (obj) { return 1; },
records: function (obj) { return obj.length; }
}
}).jqGrid('navGrid', '#pager',
{edit: true, add: true, del: true, refresh: true, view: false},
editSettings, addSettings, delSettings,
{multipleSearch: true, jqModal: false, //overlay: false,
onClose: function (/*$form*/) {
// if we close the search dialog during the datapicker are opened
// the datepicker will stay opened. To fix this we have to hide
// the div used by datepicker
$("div#ui-datepicker-div.ui-datepicker").hide();
}}, {closeOnEscape: true});
grid_on_facilities.jqGrid('filterToolbar');