How to refresh jqGrid search dialog with postData filters -


i'm working jqgrid, , far working great. i'm working on allowing users able save searches can retrieve them later and/or apply them different grids. saving proving easy part. can grid filter based on specified postdata filters, search dialog not refreshing filter criteria. here's little test have:

$("#grid").jqgrid('navgrid','#pager', {edit: false, add: false, del: false, refresh: false, searchtext: 'search'}, {}, {}, {}, {     multiplesearch: true,     closeaftersearch: true,     closeonescape: true,     searchonenter: true,     find: "search",     aftershowsearch: function ()     {        ...// code create save search buttons goes here         $("#fbox_" + gridid + "_save").bind('click', function()        {                                var filters = {"groupop":"and","rules":[{"field":"id","op":"eq","data":"2"}]};            $('#grid').jqgrid('setgridparam',            {                postdata: {'filters': filters}, search: true}).trigger('reloadgrid');            }      } }); 

i have tried several things, nothing seems advanced search dialog update.

as side note...i not have recreate filter set true. seems there's bug there somewhere...with recreate filter set true, when apply search, close dialog, reopen search dialog, hit "reset", close dialog, , go in, there no options available. "grouping" options (and/or). tested on of oleg's demos , result same, it's not code.

setting recreatefilter: true solved display issues. however, still had issue after click 'reset' button, close search dialog, , go in search dialog, see group operator drop-down ("and/or") , '+' button next it. able solve triggering click event on '+' button

var tablerows = $('#fbox_grid > table').find('tr');  if (tablerows.length == 2) {     $('input[type="button"]').trigger('click'); } 

now works great.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -