How to apply column filtering for only searchable="true" columns?
How to apply column filtering for only searchable="true" columns?
![salman_malyk](https://secure.gravatar.com/avatar/d3d5748ca41295681b31f73ce401c3ec/?default=https%3A%2F%2Fvanillicon.com%2Fd3d5748ca41295681b31f73ce401c3ec_200.png&rating=g&size=120)
in FixedHeader
Hi, I've created serverside rending datatable. I've added the column filtering from this example. It's adding inputs to all columns even which i've disabled searchable property. How can i restrict it to only apply filter on searchable=true.
Thank You
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Ok no problem.
Here's the test case .
In this example, 5th column is set to searchable="false". So i need the filter input to be hidden too for 5th column header.
Add a class to those columns you don't want to search using
columns.className
. Use that classname is thecolumn-selector
with the jQuery :not() selector to to skip those columns. See the updated example:http://live.datatables.net/hukileju/9/edit
Kevin