How to use `column().search()` on different columns using different search terms.
How to use `column().search()` on different columns using different search terms.
rdm
Posts: 194Questions: 55Answers: 4
I have a scenario where I need to filter column 4 by one term and column 5 by another.
While the first statement works as intended, the second statement never happens. How can I make sure that both searches apply?
detail.column(4).data().search(rowText);
detail.column(5).data().search(colText);
detail.draw();
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Could it be this simple? Adding draw to each statement instead of at the end? Although it appears to work as intended, I'm still not sure I'm doing it right.
Hi @rdm ,
The problem is that you had
data()
before the search on the first post - your second doesn't.Your second post is right, or you could have a single
draw()
, like this:See the example here.
Cheers,
Colin