简体   繁体   English

使用fnFilter()获取多个值的完全匹配

[英]Get the exact match using fnFilter() for multiple values

I am using fnFilter() to filter the values as shown below. 我正在使用fnFilter()来过滤值,如下所示。 If I select 2 check-boxes to filter my searchString would be --> Inprogress|Delivered 如果我选择2个复选框来过滤我的searchString将是 - > Inprogress|Delivered

 searchText =  "Inprogress|Delivered";
 oTable.fnFilter(searchText,18,true, false);
 //oTable.fnFilter("^"+searchText+"$", 18, true, false);

However I have another value in my Table Inprogress and ready which is also getting filtered because I have selected Inprogress . 但是我在Table Inprogress and ready另一个值,因为我已经选择了Inprogress因此它也被过滤了。

Please help me how can avoid this situation because I want to get the exact match even if I select multiple values to filter. 请帮助我如何避免这种情况,因为我想获得完全匹配,即使我选择多个值进行过滤。

Thanks in Advance. 提前致谢。 Suggestions are highly appreciated. 建议非常感谢。

It worked with slight modification 它稍作修改

searchText =  "(Inprogress|Delivered)";
oTable.fnFilter(searchText+"$",18,true, false);

$ to specify end of search text. $指定搜索文本的结尾。 18 is column number is above code 18是列号是上面的代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM