「sopt」オプションをコメントアウトすると、filtertoolbar を使用した以下のオプションを含むグリッドが正常に機能しますが、コメントを外したオプションでは機能しません。私の実際のグリッドでは、すべてのグリッドの外側で cmTemplate が指定されています$.extend($.jgrid.defaults,{})
- それでも同じ問題が発生します
$('#Table').jqGrid({
cmTemplate: {
searchoptions: {
// sopt: ['eq', 'ne', 'cn'] //un comment this line then run again and try to use filtere to see the difference
}
},
datatype: 'local',
data: [{
Code: 'code1'},
{
Code: 'code2'},
{
Code: 'code3'}],
colNames: ['Code'],
colModel: [{
name: 'Code',
index: 'Code'}],
pager: '#Pager'
}).jqGrid('filterToolbar', {
searchOnEnter: false,
defaultSearch: 'cn'
}).trigger('reloadGrid');