Specify default filter in jqgrid

I want to preload a set of filters at the initial mesh load. The reason for this is because I plan to save the last filter selected in the session variable so that the user returns to the grid when he left it for the last time.

I know that there is an option to set defaultValue in editoptions for one column, but I'm looking for a way to load the entire filter at once. (Not a function for every coulmn).

+6
source share
2 answers

I assume you are using advanced filtering search. A filter is nothing more than a value postData.filters. See here and a demo from another old answer for details.

, , , localStorage , . , , localStorage cookie .

+6

defaultValue searchoptions:

searchoptions:({ sopt:['eq'], defaultValue:"SomeValue" })
0

All Articles