Render using values from other column
Render using values from other column
Hi,
I am trying to use value from other columns while rendering column 8:
{
           "targets": [ 8 ],
           "render": function (data, type, row) {
               console.log(row[0]);
                return data+row[0];
           }
}
But row[0] is displayed as undefined. I tried other values (row[1] and row[2]) so I am 100% sure that the value for that column is defined.
Should that render function definition work? What is wrong if so?
Thanks!
This discussion has been closed.
            
Answers
I just found that it is enough to do row.foo, where foo is the data we want to retrieve.
console.log(row) will show the whole object.