Child Row Info Fetched by Ajax from Other Table

Child Row Info Fetched by Ajax from Other Table

ayzayz Posts: 63Questions: 23Answers: 1

As per this, where you say "...possibly including, for example, an Ajax call to the server to obtain any extra information." Can you possibly share a jsbin that does this?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,300Questions: 26Answers: 4,945
    edited April 2018

    See if the code in this thread helps get you started:
    https://datatables.net/forums/discussion/24868

    Kevin

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    I wrote a blog post about it a little while back. I'll add a link from the example.

    Allan

  • ayzayz Posts: 63Questions: 23Answers: 1

    Thanks: I'm wondering how this would work with responsive option on. When you expand, would it immediately show the present but hidden columns whilst awaiting the ajax response for the pulled in info which I would like to put in a div?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    If you are using Responsive, you either want to change Responsive's default so it doesn't use a child row or change your details display to not use a child row. Having two different orthogonal uses of the child row doesn't work well I'm afraid.

    Allan

  • ayzayz Posts: 63Questions: 23Answers: 1

    So it should be possible to create something like a bootstrap popover from the clicked row for the ajax sourced data, leaving default responsive child row behaviour?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Absolutely. Typically for that kind of thing I've seen a column with a "Details" link or button which when clicked will launch a popover.

    Allan

This discussion has been closed.