How to get row nodes with table.search(value) method?
How to get row nodes with table.search(value) method?
I want to change the background color of match rows like this:
I've found many examples here but almost of them are:
myDataTable.columns([1]).search('Engineer').draw()
I don't want to hide mismatched row but only highlight matched row, something like this:
myDataTable.columns([1]).search('Engineer').nodes().to$().addClass('highlight')
But it seems search method doesn't return the matched row element.
Anybody could help me? Thanks.
This question has an accepted answers - jump to answer
Answers
Hi @sikariba ,
I did something similar recently - take a look at this example from this forum chat.
Hope that helps,
Cheers,
Colin
Thanks! That' s exactly what I want!