How to add two subtables to the Datatable row?
How to add two subtables to the Datatable row?

We have an example from Datatable team how to add subtable to a row here: https://datatables.net/examples/api/row_details.html
It could be done with selecting a row and adding new content with row.child()
function.
I successfully did this, and now my table looks like:
<tbody>
<tr class="main-row">
<tr class="sub-row">
</tbody>
How I can add a subtable after a sub-row
?
I'm trying to select sub-row
with jQuery selector and create a data table row from it with table.row('.sub-row')
- but it gives me and empty value, like:
This question has an accepted answers - jump to answer
Answers
EXAMPLE: live.datatables.net/yumimadi/1/edit
Call
row().child.show()
once for each row. Build one string that contains all of the HTML - both tables in your case. Like this:http://live.datatables.net/vitafeju/1/edit
Also note you are using the same
id
for the tables in each child. Theid
's are expected to be unique for each element on the page.Kevin