How can I filter datatable rows which contain a cell with a specific value? I need to show either all rows, or only the rows with a specific value "A" in a specific column.
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>A</td>
</tr>
Here is an example of filtering by row class, but the data source I will have will not provide row classes.
The example uses:
$.fn.dataTableExt.afnFiltering.push(function (oSettings, aData, iDataIndex) {
var myRowClasses = oSettings.aoData[iDataIndex].nTr.className.split(" ");
var grade = $('.grade-check:checked').data('grade');
return myRowClasses.indexOf(grade) > -1;
});
I need to change this so that it looks for rows with which have the td value instead of rows with a class name.
http://jsfiddle.net/lbriquet/d2b6vmdm/3/
Thank you in advance for your help!!