buttons export data don't work for child row details

buttons export data don't work for child row details

alelimaalelima Posts: 2Questions: 1Answers: 0
 function format(d) {
        var dadosCliente = false;
        dadosCliente = 
                    '<span style="font-weight: normal;">Cliente(s): <span style="color: #49AFCD">';
                    var clientes = d.cliente;
        if(clientes.length > 0){
            
            for(var i = 0; i < clientes.length; i++){
                var umCliente = clientes[i];
                if(i < clientes.length - 1){
                    dadosCliente += umCliente + ', ';
                }else{
                    dadosCliente += umCliente;
                }
            }
        }else{
            dadosCliente += "Nada consta.";
            
        }
        dadosCliente += '</span></span>';
        return dadosCliente;
                
    }
    
    
    // Add event listener for opening and closing details
    $('#table-negociacao tbody').on('click', 'td.details-control', function () {
        var tr = $(this).closest('tr');
        var row = table.row( tr );
 
        if ( row.child.isShown() ) {
            // This row is already open - close it
            row.child.hide();
            tr.removeClass('shown');
        }
        else {
            // Open this row
            row.child( format(row.data()) ).show();
            tr.addClass('shown');
        }
    });

Answers

  • alelimaalelima Posts: 2Questions: 1Answers: 0

    Sorry. My english is not very good. I am brazilian. Any way, pdf, print, excel, not work with child row details. Can someone help me?

This discussion has been closed.