Hi I have created a user message page with this plugin. The grid will show the user inbox and the user outbox(sent) messages. here's a little code:
jQuery(document).ready(function() {
//...some stuff
currentURL = function() {
return 'json_member_mail.php?task='+ currentBox;
//where current box is either inbox or outbox
}
//... alot of stuff
myGrid = jQuery("#list").jqGrid({
url:currentURL(),
datatype: 'json',
mtype: 'GET',
// even more stuff ....
}).jqGrid('navGrid','#pager',
{
the lil stuff....
search:true,
//the dialog...
}
// the dialog form editing whatever...
);//grid
});//document.ready
so then when the user clicks on outbox something like this happens:
jQuery("#list").jqGrid('setGridParam',{ url:currentURL(), postData:{lrt:lastReloadTime} }).trigger("reloadGrid"); //where current URL has the GET param task=outbox
it working all great until I use my search filters. for example I search for the messages sent from the user 'foo' and it's all good but when I click on outbox it will still try to show me messages sent by the user 'foo' but I want the search filters to be reset.
I tried loading the search dialog on document ready and closing it immediately to get the filter().reset and all that but it doesn't work :the-built-in-search-filter-box
myGrid.trigger('reloadGrid'); has the same behaviour as well
.jqGrid('setGridParam',{ url:currentURL(), postData:{_search:'false'} }).trigger("reloadGrid");
would fix my problem but it won't override the _search param.
any generous suggestions?