Highlight row based on the row value
Highlight row based on the row value
drakula1234
Posts: 58Questions: 1Answers: 0
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.
[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.
This discussion has been closed.
Replies
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