Highlighting rows not working
Highlighting rows not working
GarthMartin
Posts: 4Questions: 2Answers: 0
I am trying to highlight rows based on the example here:
http://datatables.net/reference/type/row-selector
but the line that is supposed to add the highlighting:
table.rows(indexes).nodes().to$().addClass('highlight');
is not working. The indexes array has the indexes I expect it to based on my filter criteria, and if I specify explicitly the rows I want to highlight it works as expected. Should this be working under 1.10.2?
Thanks,
This discussion has been closed.
Answers
Do you actually have a "highlight" class in your CSS?
Yes.....as I said, if I explicitly specify the row to highlight, it works as expected. It is only when the array is passed that it does not work.
What does your DataTable initialisation look like?
The code above looks just fine - but it depends on what
indexes
is. Can you provide a link to a test case showing the issue please.Allan