columns.render() - referencing a different column in render function
columns.render() - referencing a different column in render function
JoeJoeJoe
Posts: 50Questions: 13Answers: 1
I'm trying to reference a separate column in the first "if" statement for the code below. I've tried every combination under the sun apart from the one that is correct apparently.
"data": "ErrorCount",
"render": function (data, type, row) {
var kTable = $('WTM_TABLE').DataTable();
if ( /*kTable.EndDate cell data for this row*/ == "9999-01-01T00:00:00") {
return '<i class="far fa-dot-circle" style="color:yellow"></i>';
}
if (data == 0) {
return '<i class="far fa-dot-circle" style="color:green"></i>';
}
return '<i class="far fa-dot-circle" style="color:red"></i>';
},
Thank you for your time,
This discussion has been closed.
Replies
Figured it out, the answer is: row.EndDate