Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqgrid refresh grid button doesn't pass along filters

when i use jqgrid and enter values on the top toolbar filter or the advanced filter and then click the "refresh grid" button in the footer of the grid, it wipes out the values in the filters.

is this a bug in jqgrid, or is there something that you have to do explicitally for it to keep the state of the toolbar column filters.

is there anyway to get this to work?enter image description here

like image 615
leora Avatar asked May 09 '11 20:05

leora


1 Answers

How you can see in the source code of jqGrid (see here) the behavior is by design so. The oldest version of jqGrid which I could found is jqGrid 3.5.2 and in the version the grid filters ware also reseted.

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

Another possibility for reloading customization are beforeRefresh and afterRefresh events.

like image 189
Oleg Avatar answered Nov 15 '22 04:11

Oleg