Bootstrap Expandable child-row with ajax content loaded
Bootstrap Expandable child-row with ajax content loaded
Hi,
I'd like to create an accordion-style expandable/collapsible child row with additional content.
If I try to add a new <tr><td> ...additional content ... </td></tr> into a data-table <tbody> tag (as I've successfully done with a normal bootstrap table) i get this error:
DataTables warning: table id=tabellaDati - Requested unknown parameter '1' for row 1. For more information about this error, please see http://datatables.net/tn/4
I know there's some examples out there, as this one https://www.datatables.net/blog/2014-10-02, but I need to style my additional content directly on the html page or, even better, through ajax call, and not on the javascript code..
Would it be possible?
Thank you
Alex
This question has an accepted answers - jump to answer
Answers
This page
https://www.datatables.net/examples/api/row_details.html
says that you can apply an Ajax call to obtain child row details.
Thank you for your answer, tangerine.
but wouldn't it be possible to write the child row tags in the html (as the main datatable) without having javascript raise the warning message?
In this way I could manage opening/closing with bootstrap accordions, instead of datatable script.