I have been fancying the idea of creating my own search dialog to create the search criteria that differs from the approach mentioned in the jqGrid documentation. This for m
First of all I can mention, that I am a little pessimistic about implementation of custom searching dialog. The reason is that you will invest much time in the implementation. I would you better recommend to use custom controls inside of standard searching dialog. After applying the changes which I suggested it is now possible.
Look at the demo which allows you to create searching dialog like
In the way you can solve many problems which you described in your question.
If you do decide to create custom searching dialog you will have to do the following:
postData
properties..trigger.("reloadGrid")
You don't need make separate Ajax request to the server. Reloading of the grid is what you need to do.
If you want to save the information about the filter in the postData.filters
you have to hold the standard format. In the case you can have advantage of local data filtering (datatype: 'local'
or the usage of loadonce: true
). See the demo from the answer as an example.
If you want to implement filtering of data on the server side only you can use any format of additional properties (please don't use the same name filters
). If you want to have searching filter (controls) always visible on the page I would recommend you to use the technique with postData
properties as function (see the answer).