How to show additional information about a row on a new page?

How to show additional information about a row on a new page?

[Deleted User][Deleted User] Posts: 0Questions: 6Answers: 0

referencting to https://www.datatables.net/release-datatables/examples/api/row_details.html

Hey,
I am trying to make a row clickable and show the additonal information of that row on a new page which is opening. I am a jQuery beginner and not quite sure how to do that.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Did you see the code to do that example is on the page you linked to? Look beneath the table, it's all there.

    Colin

  • [Deleted User][Deleted User] Posts: 0Questions: 6Answers: 0

    Hey Colin,

    the code on that example shows me how to attach a child row to a parent row. But I want to show these child rows on an additional page by clicking on a parent row.

  • ComGreedComGreed Posts: 15Questions: 3Answers: 1
    Answer ✓

    Maybe something like this. You just have to use the content of the array to populate whatever page on plan to use it on next.

    $(document).ready(function() {
        let table = $('#table').DataTable();
         
        $('#table tbody').on('click', 'tr', function () {
            let data = table.row(this).data();
            console.log('Here is your data: ', data);
        } );
    } );
    
This discussion has been closed.