Highlight on datatable when perform search
Highlight on datatable when perform search
spiderkzn
Posts: 44Questions: 12Answers: 0
Hi,
I need to highlight on specific column while searching without search the whole datatable?
I have tried use https://datatables.net/blog/2014-10-22 but it not working.
Or can I disable highlight search on whole datatable?
Answers
Can you link to a page showing the issue please? It works in the example you link to, although that is an older version of DataTables, so perhaps something needs updating somewhere. A link to a test case showing the problem would help me resolve it.
Allan
To highlight specific columns you can use
columns.className
to apply a classname for highlighting then update the selector used to highlight to include the classname, for example:Here is a running test case highlighting only the Position column:
https://live.datatables.net/liqoxife/1/edit
Kevin
Doh, thank you Kevin. I misunderstood the question!
Allan