First of all, thanks for the product - looks very thorough.
I'm trying to use the afnFiltering function to implement a customer filter but it seems that the function is never called despite my issuing the fnDraw() on the dataTable object. Is there any way to test whether the function gets called and that the failure of the filter code to actually filter out any rows is due to the code in the filter function itself? Here is the function as I have implemented it:
The alert, even if uncommented, does not appear.
Tanks in advance.
I'm trying to use the afnFiltering function to implement a customer filter but it seems that the function is never called despite my issuing the fnDraw() on the dataTable object. Is there any way to test whether the function gets called and that the failure of the filter code to actually filter out any rows is due to the code in the filter function itself? Here is the function as I have implemented it:
$.fn.dataTableExt.afnFiltering.push( function( oSettings, aData, iDataIndex ) { //alert('Custom filtering taking place NOW!!!'); var strFilters = new Array(); var boolReturn = true; $("#ProductAccordion table:first thead tr td").each(function(index) { strFilters[index] = ''; $(this).find("input[type='checkbox']:not('.allCheck')").each(function() { if($(this).is(':checked')) { strFilters[index] += '|' + $(this).attr('id'); } }); if (strFilters[index] != '') { strFilters[index] = strFilters[index].substr(1); } }); for (var i=0; i < strFilters.length; i++) { var regExpCol = new RegExp(strFilters[i]); boolReturn = boolReturn & regExpCol.test(aData[i]); } return boolReturn; } );
The alert, even if uncommented, does not appear.
Tanks in advance.