FastTrack
FastTrack

Reputation: 8980

jqGrid Update Filter Toolbar Dropdowns after Search

After looking at this answer from @Oleg, I would like to know how we can update the filter toolbar after a search has been performed.

For example:

In Oleg's example, if you select the Sport option from the Category dropdown, the Subcategory dropdown still has Football, Formula 1, Mathematics and Physics as options even though they are not shown in the grid after the search.

How can we update that code so that, for example, when I select Sport from the Category dropdown, the filter toolbar is updated so that the dropdowns only have options from the new set of data after the search?

I've been trying to "refresh" or "update" the filter toolbar after a search has been performed, but I can't figure out how to do this.

Upvotes: 1

Views: 1063

Answers (1)

Oleg
Oleg

Reputation: 221997

What you mean is dependent selects. I posted the answer with the demo which demonstrates the solution. I plan to implement soon new feature in free jqGrid (it's my fork of jqGrid) the possibility to refresh the options of select. It will make the implementation of dependent select much more simple. Currently one have to refill all options manually.

Upvotes: 3

Related Questions