如何为新的free-jqgrid保留tradicional过滤器格式?

时间:2016-01-20 21:36:38

标签: jqgrid free-jqgrid

我正在尝试从jqGrid v4.7升级到最新的jqGrid 4.12.1 - free jqGrid fork。

我面临的问题是,使用服务器端搜索,过滤器参数不能使用前者

构建
{"groupOp":"AND","rules":[{"field":"Name","op":"cn","data":"bob"}]}

样式,我只获得Namebob参数_search true 1. 3K accounts that are delinquent with BadPhones as Primary. 2. 3K accounts that are delinquent with BadPhones as Secondary. 3. 3K accounts that are delinquent with BadPhones as ANI. 4. 3K accounts that are current with BadPhones as Primary. 5. 3K accounts that are current with BadPhones as Secondary. 6. 3K accounts that are current with BadPhones as ANI. 7. 3K accounts that are delinquent with WrongPhones as Primary. 8. 3K accounts that are delinquent with WrongPhones as Secondary. 9. 3K accounts that are delinquent with WrongPhones as ANI. 10. 3K accounts that are current with WrongPhones as Primary. 11. 3K accounts that are current with WrongPhones as Secondary. 12. 3K accounts that are current with WrongPhones as ANI. 13. 3K accounts that are delinquent with Good Phones as Primary. 14. 3K accounts that are delinquent with Good Phones as Secondary. 15. 3K accounts that are delinquent with Good Phones as ANI. 16. 3K accounts that are current with Good Phones as Primary. 17. 3K accounts that are current with Good Phones as Secondary. 18. 3K accounts that are current with Good Phones as ANI. }。

我在这里缺少什么?

提前致谢

1 个答案:

答案 0 :(得分:1)

我认为您使用filterToolbar而没有stringResult: true参数,问题与jqGrid 4.7的升级无关,以释放jqGrid 4.12.1。请参阅filterToolbar的{​​{3}}的第一部分,其中描述了:

  

激活搜索后,会发布类型为name:value的数组   到服务器。请注意,此数组已添加到postData   参数。我们仅发布具有输入值的字段。什么时候我们   清除搜索表单后,将从postData中删除这些值   阵列。发布到服务器时,我们尝试传递,而不是名称,但是   index中设置的colModel。如果找不到index,我们会使用   name。此外,我们会在发布的数据中添加_search=true

     

stringResult选项设置为true时,数据会发布到   server是一个字符串,发布数据的结构是相同的   在the documentation