[Solved]Column Filtering Problem
[Solved]Column Filtering Problem
Hi,
I implemented http://datatables.net/examples/api/multi_filter_select.html in my application but not working in my case where we have two values "Non-System" and "System".
When I select "Non-System" it works fine and shows only Non-System.
When I select "System" it shows all.
Is there any configuration i have to do for such search?
Thanks,
Anjib
I implemented http://datatables.net/examples/api/multi_filter_select.html in my application but not working in my case where we have two values "Non-System" and "System".
When I select "Non-System" it works fine and shows only Non-System.
When I select "System" it shows all.
Is there any configuration i have to do for such search?
Thanks,
Anjib
This discussion has been closed.
Replies
You can use regular expression matching and force it to match the beginning and/or ending of the line with anchors ^ and $, respectively
[code]oTable.fnFilter('^System', colNum, true); // use anchor to match only beginning of line containing system[/code]
http://www.datatables.net/ref#fnFilter
----------------------------------
in the script on that example page, replace near the bottom:
[code]
$('select', this).change( function () {
oTable.fnFilter( "^" + $(this).val(), i, true ); // use reg exp matching and anchor
} );[/code]