YUI DataTable - 多列过滤
我知道,可以在客户端上过滤 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
修改现有示例的最简单方法是构建一个包含每个文本框信息的请求字符串。例如(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.