Last Updated: February 25, 2016
·
5.218K
· redcomet

jqGrid Refresh WITH Filters

jqGrid's designed Refresh button will clear any searches your users have done. It's meant to be more of a 'Reset' than an actual refresh.

This custom button will just simply call reloadGrid and not clear the filters.

$('#grid').jqGrid( {
    gridoptions...
    colModel: [
    ]
} ).navButtonAdd("#grid_pager", { 
    caption:'', buttonicon: 'ui-icon-refresh', 
    onClickButton: function() {
        $("#grid").trigger("reloadGrid");
    }, position: 'first', title: 'Refresh'} );