How to get invisible cells in DataTables createdRow or rowCallBack
How to get invisible cells in DataTables createdRow or rowCallBack

Hi brothers, I have a problem, I made a statement from the title if I need to open a little more I used DataTable Column Visible
and I want to push data in invisible column but I couldnt find invisible columns.
code:
"columnDefs": [ {"targets": [6, 7, 8, 9, 10, 11, 12, 13, 14], "visible": false,}, {"className": "text-center", "targets": [6, 7, 10]} ], "createdRow": function (row, data, index,) { var $cells = row.cells[8] //invisible columns ; debugger if ($.type(data.subject) === 'object') { descriptionModalButton = MyButton //this is html button I not writing in pre tag ;( $cell.html(descriptionModalButton); $cell.append('p class="description" hidden>' + data.subject.subject + 'p') } },
var $cells = row.cells[8] // problem here rows.cells[8] returning undefined
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
According to the
createdRow
docs therow
parameter is thetr
row element. Thedata
parameter contains the data for the row. So you would use something like thisvar $cells = data[8] //invisible columns ;
.Kevin
Hi Kevin, thank you for everything.