在阅读了 jqGrid wiki(并以来自 Case insensitive search in jqGrid including hidden fields 的示例)后,我找不到我想要做的事情。
是否有任何搜索选项可以在列中的任何位置启用搜索(自动通配符)。
如果该列包含“Apple Iphone”,我将能够使用搜索“iphone”找到它。
SQL 等效项是 select * from table where lower(columnX) like '%iphone%';
最佳答案
由于您使用 toolbar searching您的问题的解决方案似乎很简单。你应该:
ignoreCase:true
到 jqGrid 参数 defaultSearch:'cn'
filterToolbar 的调用选项.例如:$("#list").jqGrid('filterToolbar', {defaultSearch:'cn'})
. stype:'select'
) 中使用任何选择元素,您应该将其包含在 searchoptions
的列表中。 sopt
以 'eq' 开头的选项:stype:'select', searchoptions: {sopt:['eq','ne']}
例如。 关于使用工具栏搜索在 jqGrid 中默认在列中间搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5499995/