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,365Questions: 39Answers: 395

    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,365Questions: 39Answers: 395

    What does your DataTable initialisation look like?

  • allanallan Posts: 63,683Questions: 1Answers: 10,498 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.