Jqgrid grid refresh button does not go through filters

when I use jqgrid and enter the values ​​in the upper filter of the toolbar or the advanced filter, and then click the Refresh Grid button in the footer of the grid, it will destroy the values ​​in the filters.

is this a bug in jqgrid, or is there something you need to do explicitly to keep the state of the toolbar column filters.

Anyway, for this to work? enter image description here

+6
source share
1 answer

As you can see in the jqGrid source code (see here ), the design behavior is like this. The oldest version of jqGrid that I could find is jqGrid 3.5.2, and the version also dumped the contents of the grid.

If you need different reload button behavior, you can add (using navButtonAdd ) your custom button, which looks like the original reload button (this cat has "ui-icon-refresh" as the buttonicon parameter) and implements a different reload behavior. For example, you can simply call trigger("reloadGrid", [{page:1}]) .

Another option is to reload the settings beforeRefresh and afterRefresh events.

+5
source

Source: https://habr.com/ru/post/887660/


All Articles