How to do a custom filter on multiple columns on the table
How to do a custom filter on multiple columns on the table
Hi,
We have a problem, that we want to create a new filter, that know to filter a few words, with separation like ';'
and show only the rows that this words are appear on it,
like if the string will be "sagi;vlada;google"
so, just the rows with sagi, vlada and google, will show in the table,
is it possible to implement from the current filter, or we need to do a new one?
Thanks,
Sagi
We have a problem, that we want to create a new filter, that know to filter a few words, with separation like ';'
and show only the rows that this words are appear on it,
like if the string will be "sagi;vlada;google"
so, just the rows with sagi, vlada and google, will show in the table,
is it possible to implement from the current filter, or we need to do a new one?
Thanks,
Sagi
This discussion has been closed.
Replies
Yes, this will work with DataTables as it stands - all you need to do is call fnFilter with the filter string "sagi vlada google". For example:
[code]
oTable.fnFilter( "sagi vlada google" );
[/code]
This works because DataTables basically does an 'AND' with space separated words on the global filter.
Regards,
Allan