RowGroup with Expand Collapse

RowGroup with Expand Collapse

ArchanaDArchanaD Posts: 2Questions: 1Answers: 0
edited July 2018 in Free community support

Hi,

I am using Data Table for displaying data. I have requirement of grouping data. This I can achieve with the help of RowGroup plugin.
My problem is; I want to use it further to display only grouped rows as summary & on clicking of it it should display detailed row information.

My Question is how to get Rows.data() for group of rows?

I am using below function on click of

 $('#example tbody').on( 'click', 'tr td.details-control', function () {
        var tr = $(this).closest('tr');
        var row = dt.row( tr );
        var idx = $.inArray( tr.attr('id'), detailRows );
 
        if ( row.child.isShown() ) {
            tr.removeClass( 'details' );
            row.child.hide();
 
            // Remove from the 'open' array
            detailRows.splice( idx, 1 );
        }
        else {
            tr.addClass( 'details' );
         **   row.child( format( row.data() ) ).show();**
 
            // Add to the 'open' array
            if ( idx === -1 ) {
                detailRows.push( tr.attr('id') );
            }
        }
    } );

Thanking you in anticipation

Answers

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

    This pull request recently added that very feature. It is in the nightly version. I haven't yet played around wtih it myself, but that should do what you are looking for.

    Allan

  • ArchanaDArchanaD Posts: 2Questions: 1Answers: 0
    edited July 2018

    Thanks Allan. When it will be get merged in released version? Any timeline?

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

    When its ready I'm afraid. No specific schedule for it yet.

    Allan

This discussion has been closed.