YUI DataTable - 多列过滤

发布于 2024-08-29 11:19:44 字数 373 浏览 2 评论 0原文

我知道,可以在客户端上过滤 dataTable Control,如下例所示:

http://developer.yahoo.com/yui/examples/datatable/dt_localfilter.html

是否还可以过滤更多列?我想要有 2 个文本字段,当我在第一个文本字段中输入内容时,DataTable 将根据“地区代码”(来自示例)进行过滤,当我在第二个文本字段中输入内容时,DataTable 将根据“状态'。

这有可能吗?感谢您的任何帮助。

I know, that it is possible to filter dataTable Control on client as it is shown in this exaple:

http://developer.yahoo.com/yui/examples/datatable/dt_localfilter.html

Is it also possible to filter more columns? I'd like to have 2 textfields, and when I type sth to the first one, DataTable would filter according to the 'areacode' (from the example) and when I type sth to the second one, DataTable would filter according to the 'state'.

Is this possible somehow? Thanks for any help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墟烟 2024-09-05 11:19:44

修改现有示例的最简单方法是构建一个包含每个文本框信息的请求字符串。例如(column1=a&colum2=b),修改doBeforeCallback来拆分请求,并对每一列进行过滤。

The simplest way to modify the existing example would be to build a request string that contains the information for each text box. For example (column1=a&colum2=b), modify the doBeforeCallback to split the request and do the filtering for each column.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文