How to add a row to the inner table of nested tables?
How to add a row to the inner table of nested tables?
gh2m
Posts: 63Questions: 16Answers: 0
I would like to have a button to add the row data. Is that possible?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Are you talking about the child detail rows of this example?
https://datatables.net/examples/api/row_details.html
Kevin
Not exactly. Here is the link to my test case: http://live.datatables.net/zibidoji/1/edit
I hope user can fill name, team, server, and row number fields and clicks Add an inner row button to add it under the row number provided, in detailsTable table
You are getting the following error:
You need to change the child Datatable initialization to get a Datatable API instance by using
DataTable()
instead ofdataTable()
. Please see the API docs for more details. You need this:oInnerTable = $("#exampleTable_" + iTableCounter).DataTable({
Here is the updated example:
http://live.datatables.net/zibidoji/4/edit
Kevin
This works great. Thank you Kevin.