Bootstrap Expandable child-row with ajax content loaded

Bootstrap Expandable child-row with ajax content loaded

alzamboalzambo Posts: 38Questions: 17Answers: 1

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

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394
    Answer ✓

    This page

    https://www.datatables.net/examples/api/row_details.html

    says that you can apply an Ajax call to obtain child row details.

  • alzamboalzambo Posts: 38Questions: 17Answers: 1
    edited May 2015

    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.

This discussion has been closed.