Excel就像在jqgrid中过滤一样 [英] Excel like filtering in jqgrid

查看:77
本文介绍了Excel就像在jqgrid中过滤一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是jquery和jqGrid的新手.我正在努力工作.我需要有人在JqGrid中帮助我,我需要在jqGrid中使用过滤头.当我发现实现,但这对我不起作用.请在需要时帮助我,因为我非常需要它.

预先感谢

解决方案

我不喜欢"Excel之类的过滤"之类的词,因为每个人都以不同的方式解释它.所以我必须以解释的方式回答.

我认为您应该使用jQuery UI MultiSelect Widget Eric Hynds .我写了一些答案和演示,然后演示了如何使用它.

该演示显示了如何一起使用jQuery UI MultiSelect Widget与工具栏搜索来实现类似于Excel的过滤"

通过这种方式,您可以动态构建multiselect小部件显示的值列表,就像答案.

另一个答案()显示了如何使用小部件进行编辑.

已更新:更新的演示使用jqGrid 4.4.1,jQuery UI 1.8.24和jQuery 1.8.2以及从答案包含filterToolbarbeforeClear回调,即使用刷新"按钮时需要.答案包含使用jqGrid 4.6.0的更新演示.

I am new to jquery and jqGrid. I am struggling with it.I need someone to help me in the JqGrid that I need a filtering headers in the jqGrid.I look for it when I found a demo done by Oleg. But I need checkbox when I select on checkbox search values have to to be filtered just like Excel Filtering.Please help me out someone.

Even I findout the implementation but that is not working to me.Please help me in it,as I need it badly.

Thanks in Advance

解决方案

I don't like words like "Excel like filtering" because everybody interprets it in different way. So I have to answer in the way how I interpret it.

I think that you should use jQuery UI MultiSelect Widget written by Eric Hynds. I wrote some answers and demos before which shows how to use it.

The demo shows how to use jQuery UI MultiSelect Widget together with toolbar searching to implement "Excel like filtering".

By the way you can build the list of values displayed by the multiselect widget dynamically like the values of jQuery UI Autocomplete in the answer.

Another answers (this and this) with the corresponding demos (this and this) shows how to use the widget for editing.

UPDATED: The updated demo uses jqGrid 4.4.1, jQuery UI 1.8.24 and jQuery 1.8.2 and the current (version 1.13.6 from 29.09.2012) version of jQuery UI Multiselect downloaded from github.

UPDATED 2: The answer contains beforeClear callback of filterToolbar which is required in case of usage "Refresh" button. The answer contains the updated demo which uses jqGrid 4.6.0.

这篇关于Excel就像在jqgrid中过滤一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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