Get the current cell from within the render function
Get the current cell from within the render function
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!!!
This discussion has been closed.
Answers
See the
columns.renderdocs for information about the function parameters. Thedataparameter will give you the value for the cell. This example shows how to render cell data into something more visual.Use
columns.createCellto get the cell's node.Kevin