Individual Column (text) Searching - Certain Columns only
Individual Column (text) Searching - Certain Columns only

Is it possible to show the Individual Column (text) searching on certain columns?
When I had it set up as 'select' boxes, there was a line of code that said:
this.api().columns().every
which could be changed to this.api().columns([0,1,2,3]).every
This does not seem to be working with the Text search boxes. I am trying to implement these text search boxes in the footer of the table, exactly how they are shown in https://datatables.net/examples/api/multi_filter.html, but I'd like to leave the boxes off of a few columns.
This question has an accepted answers - jump to answer
Answers
Probably the easiest way is to use a className assigned to the
th
for each footer you want the search input. Then, from the example you linked to use the className as the selector in line 3 and line 12, like this usingmy-class
:Line 3:
$('#example tfoot th:my-class').each( function () {
Line 12:
this.api().columns( '.my-class' ).every( function () {
Kevin
I found more success when I omitted the Line 12 change. When I included the line 12 change, the search would not update the datatable. When I included class='my-class' in the <th> footer tag, and in the line 3 update that you provided, everything works well.
Thank you for leading me in the right direction (again)!
http://live.datatables.net/vozejiko/1/
Good to know. Glad its working.
Kevin