using $.fn.dataTableExt.afnFiltering.push to filter tables
using $.fn.dataTableExt.afnFiltering.push to filter tables
I am using the above function to override my filter functionality as @allan has shown in http://live.datatables.net/etewoq/4/edit#source.
I have 1 table on my web page with another table that loads on the modal and I need to filter the table in the modal with date range.
How do I make sure this function applies to my table in the modal and not on the page.
In simple language if there are multiple tables in the page how do you make $.fn.dataTableExt.afnFiltering.push apply to the table you want ?
I have 1 table on my web page with another table that loads on the modal and I need to filter the table in the modal with date range.
How do I make sure this function applies to my table in the modal and not on the page.
In simple language if there are multiple tables in the page how do you make $.fn.dataTableExt.afnFiltering.push apply to the table you want ?
This discussion has been closed.
Replies
Allan
$.fn.dataTableExt.afnFiltering.push(
function( settings, aData, iDataIndex ) {
if ( settings.nTable.id === 'example' ) {
// filter example
}
else {
// ...
}
}
);
[/code]