Like this I can return the value of the current row:
"columnDefs": [
{
"render": function (data, type, row) {
return data ;
},
What I am actually looking for is the name of the current column. I tried:
"columnDefs": [
{
"render": function (data, type, row) {
return column().name ;
},
But this did not work.
If you specify a
targets
in yourcolumnDefs
you could do the following by adding ameta
parameter :JSFiddle example (check the log) : https://jsfiddle.net/1jot32nz/