I am using JQGrid to implement some requirements on a client site and love the tool, but have been unable to overcome one obstacle.
I need to keep the search parameters in place on a page refresh. I am using Multiple search and have the first part down which is to grab the search parameters when a search is performed. I am using the following code to do it:
...
loadBeforeSend: function (xhr) {
var postData = $("#list").jqGrid('getGridParam', 'postData');
var outData = '';
$.each(postData, function(key, value) {
if (key!='_search'){
outData = outData + key + '=' + value + '|';
}
});
window.location.hash = escape(outData);
},
...
This works great and on refresh I can easily grab the search data, however I have been unable to figure out how to default the search parameters to these values.
I am willing to move over to a filter toolbar implementation if that is easier.