1

Is it possible to set some column with search type "< select multiple >" for ADVANCED SEARCH? Plus, I want to create a predefined TmplFilter for that column with multiple values, so the query should be something like: MyColumn IN ('X', 'Y', 'Z')

I imagine the template with data array (?) like: ... rules: [{field:"MyColumn", op:"in", data:['X', 'Y', 'Z']}]

And the "< select multiple >" should appear filled with those values pre-selected

(my version is free jqgrid-4.13.6)

==================

EDIT: To be clear, this is an example drawing (not real grid)

Advanced Search + Template Filters with Select Multiple

What I want is... when click on "Search" button (which opens Advanced Search popup, I know how to use this feature, of course), I want to have some "Templates", when I select one (ie: "With Errors") this will create a rule with Field:"Status", Op:"IN", Data:"Return Errors, Failed Process, Processed No Records" These 3 values must be pre-selected in a combo "multiple" (as you see in the image)

Aberel
  • 162
  • 1
  • 1
  • 13
  • It's not clear what you are looking for. One can use `"in"` operation exactly like any other operation. Do you missing an example which uses `tmplFilters` and `tmplNames`? See [this one](http://www.ok-soft-gmbh.com/jqGrid/OK/formEditOnDoubleClick-jqueryui-fa-bootstrap-tmplFilters.htm) as an example. Do you need some kind of templates displayed in the grid and not in the Searching Dialog? See [the old answer](http://stackoverflow.com/a/9310762/315935). The code of the answer is old, but the idea is simple: placing "filter"-select in the top toolbar and set `postData.filters` on changing of it. – Oleg Apr 24 '17 at 09:23
  • @Oleg No, I will try to edit my question to be more clear. – Aberel Apr 24 '17 at 13:50

1 Answers1

1

Thank you for reporting the problem! The problem exists in the usage of <select> with multiple property in Searching Dialog. I introduced support of "in" operation in local searching/filtering in one of the previous version of free jqGrid, but I forgot to include the support of "in" operation in searching dialog.

I committed today the changes to GitHub. The problem should be solved now. It's important that you either update your local copy of free jqGrid files with the latest code from GitHub or you load the latest code from rawgit.com (see the wiki article).

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thank you. I didn't know it was a bug, I thought as a simple question, that's because I didn't posted in Github issues. Regards. – Aberel Apr 28 '17 at 13:59