Highlight row based on the row value

Highlight row based on the row value

drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
edited August 2012 in General
I have a hidden column that has a flag either true or false. If the flag is true I have to highlight the row. I tried to get the hidden value.

[code]
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
console.log($('td:eq(17)'), nRow).html());

}
[/code]

This one wouldn't work for me because that column is hidden and the value I see in null in the console. Is there any way I could highlight the row based on the value in the hidden column. I have checked the row highlight examples but I don't think the highlighting happens when the table is loaded.


Thanks in advance.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    > Is there any way I could highlight the row based on the value in the hidden column

    The data for the row, including the hidden columns, is available in the second parameter passed into fnRowCallback ( `aData` is the name in this case).

    Allan
  • drakula1234drakula1234 Posts: 58Questions: 1Answers: 0
    edited August 2012
    Thank you very much for the help. I was kind of confused with that aData variable. But now its working perfect
This discussion has been closed.