jqgrid - Jqgrid - 标题栏中只出现一个搜索选项
问题描述
我在 Jqgrid 中工作并遇到了问题。我查看了许多示例并阅读了大量文档,但似乎无法确定为什么只有 1 个搜索选项出现在列标题中,而不是其他搜索选项,例如“ge”“le”“eq”等?
这是我的代码:
jQuery("#jQGridDemo").jqGrid({
url: 'http://localhost:58404/JQGridHandler.ashx',
datatype: "json",
colNames: ['Property ID', 'Property Ref', 'Short Address', 'Scheme Code', 'Scheme Name', 'Property Type', 'Tenure Type', 'Status'],
colModel: [
{ name: 'PropertyID', index: 'PropertyID', width: 70, align: "left", searchoptions: {sopt: ["ge","le","eq"]}, sortable: true},
{ name: 'PropertyRef', index: 'PropertyRef', width: 75, align: "left", stype: 'text', sortable: true},
{ name: 'ShortAddress', index: 'ShortAddress', width: 200, align: "center", search:true, stype: 'text', searchoptions: {sopt: ["cn","ge","le","eq"]}, sortable: true},
{ name: 'SchemeCode', index: 'SchemeCode', width: 80, align: "center", sortable: true },
{ name: 'SchemeName', index: 'SchemeName', width: 80, align: "center", stype: 'text', sortable: true },
{name: 'PropertyType',width: 80, align: "center",},
{ name: 'TenureType', index: 'TenureType', width: 80, align: "center", sortable: true },
{ name: 'Status', index: 'Status', width: 75, align: "center", sortable: true },
],
beforeProcessing: function (data) {
//Create the filters
getDropDownValues(data, 'PropertyType')
getDropDownValues(data, 'TenureType')
getDropDownValues(data, 'Status')
$(this).jqGrid('destroyFilterToolbar')
.jqGrid('filterToolbar', {
stringResult: true,
searchOperators: true
});
},
onSelectRow: function(id){
if(id && id!==lastsel2){
jQuery('#jQGridDemo').jqGrid('restoreRow',lastsel2);
jQuery('#jQGridDemo').jqGrid('editRow',id,true);
lastsel2=id;
}
},
height: 'auto',
width: 'auto',
rowNum: 30,
editable: true,
mtype: 'GET',
loadonce: true,
rowList: [30, 40, 50],
pager: '#jQGridDemoPager',
sortname: 'PropertyId',
viewrecords: true,
sortorder: 'desc',
caption: "Property Details",
editurl: 'http://localhost:58404/JQGridHandler.ashx'
});
解决方案
推荐阅读
- javascript - Selenium - 等待 ScrollIntoView 完成
- sql - 在 BigQuery 中计算订单序列
- sql - SQL/mariadb 使用 IN() 以相同顺序在多个列上进行选择
- unity3d - Unity Assets 不会与玩家发生碰撞,但立方体等会
- android-studio - Toast 消息未在 Android Studio 中显示
- pre-commit.com - 有什么方法可以从钩子中获取用户输入?
- nestjs - 将参数放入 @Entity() 有什么作用?
- c# - 在具体类型是另一个泛型的情况下,具体实现工厂/类组合
- react-native - react-native-map-clustering:选择更改时的缓慢 UI 渲染/过渡
- facebook - 已授予应用权限但无法生成令牌