如何隐藏 JqGrid 搜索运算符下拉列表?
How to hide JqGrid search operators dropdown?
我需要在 jqGrid 控件的搜索对话框中隐藏搜索运算符下拉列表。你能告诉我这是怎么做到的吗?
请看下图
谢谢,
搜索对话框允许指定 afterRedraw
回调,可用于修改对话框的元素。你需要的是类似下面的实现
afterRedraw: function () {
$(this).find(".operators").hide();
}
如果你使用free jqGrid then you can add jqGrid option (see the wiki article)
searching: {
afterRedraw: function () {
$(this).find(".operators").hide();
}
}
指定回调。如果您使用 jqGrid,那么您应该在 navGrid
的参数列表中指定 afterRedraw
(在第 5 个参数内):
$("#grid").jqGrid("navGrid", "#pager", {/*navGrid options*/},
{/*edit options*/}, {/*add option*/},{/*del option*/},
{
afterRedraw: function () {
$(this).find(".operators").hide();
}
}
);
参见 wiki:Single field searching
例如:
$(s4list).jqGrid('searchGrid', {
multipleSearch: true,
afterShowSearch: function () {
var dialogId = $('#fbox_' + this.id);
dialogId.find('.operators').hide();
console.log(this)
}
})
还有
afterRedraw function:This 函数(如果已定义)在每次重绘过滤器时启动 - 每次我们添加或删除规则或字段时都会重绘过滤器 Tio 此函数我们将搜索参数作为参数传递
我需要在 jqGrid 控件的搜索对话框中隐藏搜索运算符下拉列表。你能告诉我这是怎么做到的吗?
请看下图
谢谢,
搜索对话框允许指定 afterRedraw
回调,可用于修改对话框的元素。你需要的是类似下面的实现
afterRedraw: function () {
$(this).find(".operators").hide();
}
如果你使用free jqGrid then you can add jqGrid option (see the wiki article)
searching: {
afterRedraw: function () {
$(this).find(".operators").hide();
}
}
指定回调。如果您使用 jqGrid,那么您应该在 navGrid
的参数列表中指定 afterRedraw
(在第 5 个参数内):
$("#grid").jqGrid("navGrid", "#pager", {/*navGrid options*/},
{/*edit options*/}, {/*add option*/},{/*del option*/},
{
afterRedraw: function () {
$(this).find(".operators").hide();
}
}
);
参见 wiki:Single field searching
例如:
$(s4list).jqGrid('searchGrid', {
multipleSearch: true,
afterShowSearch: function () {
var dialogId = $('#fbox_' + this.id);
dialogId.find('.operators').hide();
console.log(this)
}
})
还有
afterRedraw function:This 函数(如果已定义)在每次重绘过滤器时启动 - 每次我们添加或删除规则或字段时都会重绘过滤器 Tio 此函数我们将搜索参数作为参数传递