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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With