columns.render() - referencing a different column in render function
columns.render() - referencing a different column in render function
![JoeJoeJoe](https://secure.gravatar.com/avatar/6698532f728f643c1bc8a7fc9fd44c43/?default=https%3A%2F%2Fvanillicon.com%2F6698532f728f643c1bc8a7fc9fd44c43_200.png&rating=g&size=120)
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