How to search across multiple columns?

How to search across multiple columns?

ibokatibokat Posts: 5Questions: 4Answers: 0

I want to search for a specific text in 2 different columns. Basically does the keyword "hamster" appear in column 1 or 6 and display the results. But I cannot figure out how that is working.

I have tried the following but it does not appear to work.


whats the right approach?


  • allanallan Posts: 61,611Questions: 1Answers: 10,089 Site admin

    At this time that will result in a search on "hamster" on both columns 1 and 6 - an AND operation.

    To do an OR search like that, you'd need to use a function (something which was introduced in the recently released 2.0.0). e.g.:'myFunc', (row, data) => {
        return data[1] === 'hamster' || data[6] === 'hamster';

    Note I've assumed the use of array based data there, change if you are using objects, and also I've used the new search.fixed() so the end user can still use the global search.


Sign In or Register to comment.