开发者

jqGrid multiple filters and searchoptions

开发者 https://www.devze.com 2023-03-16 07:04 出处:网络
We have this grid which allows for multiple filter search: $(\"#\"+gridId).jqGrid({ colNames: [\'A\', \'B\'],

We have this grid which allows for multiple filter search:

$("#"+gridId).jqGrid({
    colNames: ['A', 'B'],
    colModel :[
    {name:'a', index:'a', stype:'select', search: true, searchoptions: {sopt: ['eq','ne'], dataUrl: '/api/A'}},
    {name:'b', index:'b', stype:'select', search: true, searchoptions: 开发者_如何学运维{sopt: ['eq','ne'], dataUrl: '/api/B'}}
    ],
    pager: '#div-pos-pager',
    loadonce: true,
    ignoreCase: true
}).navGrid('#div-pos-pager', {search:true, edit:false, add:false, del:false, refresh:false}, null, null, null, searchOptions);

The search works great but there is one issue:

  • You click the search button in the toolbar
  • You select to search by column B, column B's data options appear
  • Then you click the minus sign beside the B search row
  • Now you have one line in existence with column A selected but with column B's search options still listed

Is there away around this? So you would see column A selected with A's search options?

0

精彩评论

暂无评论...
验证码 换一张
取 消