Pass value to $.fn.dataTable.ext.search.push
Pass value to $.fn.dataTable.ext.search.push
Hi,
I have have a question about above example - I have googled for days not but cant figure it out...
When using the
$.fn.dataTable.ext.search.push(
function( settings, data, dataIndex )
{
...
}
);
it is triggered by the .draw();
How can I pass the entered value (in the current search input field) to the function?
Also, how can I access the column index of the search input field to the function) ?
I am trying to make a filter allowing me to do a numeric <> comparison on selected colums..
Thanks and regards, Thor
Answers
Just use "table.search()" to get the contents of the search input field.
https://datatables.net/reference/api/search()
Take a look at this example. If you still have questions please provide a running test case showing what you have with details of what you would like.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin