Can I Manually "Search" a Column That Has "Searchable" Set to False?

Can I Manually "Search" a Column That Has "Searchable" Set to False?

sarthazsarthaz Posts: 3Questions: 1Answers: 0

Hi Forum,

I have a column that is basically a CSV list that gets processed through a "render" script and displayed as a bunch of icons. It doesn't make sense for someone to "search" for the content of that column, so I have set it to be "searchable: false". However, there are some cases where I would like to display only the items that contain a certain icon, based on a specific user action. To do this, I've tried to do something like table.columns(2).search('some-icon'), but it doesn't work because I've disabled searching.

Is it possible for me to manually search (or filter) the rows that match some criteria without having them display in the search results of the global search box?

Thanks!

Answers

  • sarthazsarthaz Posts: 3Questions: 1Answers: 0

    Here's a JSBin thingy to see it in action:

    http://live.datatables.net/nebiduwu/3/

    The "Search" button will only work if "searchable" is set to true. I understand that sentence sounds logical, but I'm looking for differentiation between the default search box and some method of manually filtering the rows based on a criteria that can read ALL of the data. Thank you.

  • chris_nchris_n Posts: 53Questions: 3Answers: 0

    Have a look at columns.render Some of the examples there should give you some ideas of how to proceed.

This discussion has been closed.