Render using values from other column

Render using values from other column

uskerineuskerine Posts: 33Questions: 15Answers: 0
edited October 2014 in Free community support

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!

Answers

  • uskerineuskerine Posts: 33Questions: 15Answers: 0

    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.

This discussion has been closed.