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?
lol, So I made one of those stupid mistakes…
where in the original message I say “// the dialog form editing whatever…” I made a mistake
yeah I didn’t even bother to write that part on here so what I had there was:
however I realized that after I fixed my problem with a hack when I saw the overlay:false was not working and there was still a jQuery UI overlay for search…
what I did might be helpful somehow to someone who reads this one day so what I did was:
there is a get parameter nd that is a Unix Timestamp(POSIX) but in miliseconds (javascripts implementation) unlike php and mysql and most unix stuff (which is in seconds). I also sent a timestamp of the last time any of the navigation links where clicked:
then in my php file that generates the json data: