搜索后jqGrid更新过滤器工具栏下拉菜单 [英] jqGrid Update Filter Toolbar Dropdowns after Search

查看:67
本文介绍了搜索后jqGrid更新过滤器工具栏下拉菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看

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.

例如:

Oleg的示例中,如果您选择Sport Category下拉菜单中的选项,即使Subcategory下拉列表在搜索后未显示在网格中,也仍将Football, Formula 1, Mathematics and Physics作为选项.

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.

我们如何更新代码,例如,当我从Category下拉列表中选择Sport时,过滤器工具栏也会更新,以使下拉列表在搜索后仅具有来自新数据集的选项?

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.

推荐答案

您的意思是依赖选择.我用演示.我计划很快在免费jqGrid (这是我的jqGrid分支)中实现新功能刷新选择的选项.这将使依赖选择的实现更加简单.当前,必须手动填充所有选项.

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.

这篇关于搜索后jqGrid更新过滤器工具栏下拉菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆