Child Detail Rows examples and ColumnControl
Child Detail Rows examples and ColumnControl

The two Child Rows examples:
https://datatables.net/examples/api/row_details.html
https://datatables.net/examples/api/row_details_stateSave.html
Use columns.className
to assign the dt-control
classname to the column's cells, including the header. When using ColumnControl to create new headers the selector used in the examples will cause errors like this:
Uncaught TypeError: Cannot read properties of undefined (reading 'name')
when clicking in the header td
's created by ColumnControl. Here is a test case:
https://live.datatables.net/dufaheqa/1/edit
Updating the examples with a selector like table.on('click', 'tbody td.dt-control', function (e) {
will allow the developers to directly copy the examples and use ColumnControl`.
Kevin
Replies
Hi Kevin,
Thanks so much for finding this and proposing the fix. Completely agree and have committed the fix here which will be updated on the site soon.
Allan