filter column
filter column
sabiha
Posts: 3Questions: 2Answers: 0
Hi,
I want to filter the values based on a column and hide rows which do not match the criteria. I tried to use fnfilter but it is not working.
for eg I have a column "status" which has two values "Yes" nad "No" I want to display rows having "No".
Any help will be highly appreciated,
This discussion has been closed.
Answers
You can try my yadcf plugin for datatables , see first table / third column in the showcase
Hi,
I'm having a similar problem. I was using Datatables 1.9, but I've moved to 1.10 to use the buttons, but have found fnfilter is now deprecated.
The 1.10 filter example shows....
var table = $('#example').DataTable();
var filteredData = table
.column( 0 )
.data()
.filter( function ( value, index ) {
return value > 20 ? true : false;
} );
...which is fine, but what if 20 changes? How can the filtering value be changed such that it can be passed into the filter function?
Hi Daniel,
Would yadcf work for the question I asked earlier? Please take a look at https://www.datatables.net/forums/discussion/33663/re-filtering-in-datatables-1-10#latest
Thanks,
Chris