Custom search field

Custom search field

antiphpantiphp Posts: 1Questions: 1Answers: 0

Hello,

I want to adapt the visual style of my data tables by moving the search input field to the last column cell of the table header (instead of above the table).

For this I hide the native DT search field using the DT options (searching:false) and added my own custom search field within my HTML. But now I don't know how to trigger the DT search when someone is typing in my custom search field.

This documentation did not solve my problem:
http://datatables.net/examples/plug-ins/range_filtering.html
.. $.fn.dataTable.ext.search ..

because I don't want a global DT search, I want to restrict the search to the current table. I also tried to bind keyup on my custom search field to trigger the "search.dt" event, but I don't know what arguments have to be provided to that event. I opened the jquery.dataTables.js to investigate a bit, but failed. I have no idea where to get that DataTables settings object which is required or if that event is even what I'm looking for.

Any hint?

Thanks in advance,
Christian

This discussion has been closed.