Get the current cell from within the render function
Get the current cell from within the render function
MayaG
Posts: 1Questions: 1Answers: 0
Hi! I'd like to access the current's cells dom node in the render function in order to create a d3 plot for each cell. Is this possible? I tried something like
.dataTable( {
"columnDefs": [ {
"targets": 4,
"data": "description",
"render": function ( data, type, row, meta ) {
console.log(this)
}
} ]
} );
But that's not quite right... Any help appreciated!!!
Answers
See the
columns.render
docs for information about the function parameters. Thedata
parameter will give you the value for the cell. This example shows how to render cell data into something more visual.Use
columns.createCell
to get the cell's node.Kevin