Highlighting rows not working

Highlighting rows not working

GarthMartinGarthMartin 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,

Answers

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    Do you actually have a "highlight" class in your CSS?

  • GarthMartinGarthMartin Posts: 4Questions: 2Answers: 0

    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.

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    What does your DataTable initialisation look like?

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    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

This discussion has been closed.