Amy Anuszewski
Amy Anuszewski

Reputation: 1853

jgGrid Search Dropdown Not Changing

This may be a followup to this question Possible to make jqGrid Search Box Stay on Page? - Or it may be unrelated because clicking the search button manually shows the same behavior.

We have a dynamically generated grid that is created by a) making an ajax request to get the grid columns based on a report id and then b) setting up the grid model and fetching the data. When the page loads initially, we pass in a starting report id, but there is a dropdown box on the page that lets the user change reports.

When the dropdown changes, I unload any existing grid, make the ajax request to get the columns, set up the grid model, and then get the data. The columns change, the data changes, and everything looks correct - except the search columns do not change in the search dropdown.

If I close the search box and reopen it, it still has the old search columns. Likewise, if I click the reset button or reload the entire grid.

Upvotes: 0

Views: 409

Answers (1)

Amy Anuszewski
Amy Anuszewski

Reputation: 1853

I found it after a bit more poking around. I needed to set the recreateFilter option to true

 prmSearch = {recreateFilter:true,multipleSearch:true,overlay:false,sopt:['cn','eq','ne','lt','le','gt','ge','in','ni','nc']};

Upvotes: 1

Related Questions