Multi level in RowGroup

Multi level in RowGroup

antoniocibantoniocib Posts: 277Questions: 62Answers: 1

Hi, I have a problem with RowGroup's Multi-Level I don't understand why it always gives me No Group back.

var table4 = $('#Buono').DataTable( {

    dom: 'Bfrtip',
    paging: true,
    ajax: {
            url: 'php/table.Buono.php',
            type: 'POST'

    },
    order:[10,8],
    rowGroup: {
        startRender: function ( rows, group ) {
            return group +' ('+rows.count()+' Viaggi)';
        },
        endRender: function ( rows, group ) {
                var controllo = '';

                



            return $('<tr/>')
                            .addClass(colore)
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td>  ←</td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' )
                            .append( '<td></td>' );
        },



            dataSrc:[10,8],

        columnDefs: [ {
            targets: [ 10, 8 ],
            visible: false
        } ]
    },



columns:[

{
                "data": "buono.id_spedizione",
                orderable:false,
            searchable:false  //0
            },
            {
                "data": "buono.data_spedizione",
                orderable:false,
            searchable:false //1
            },
            {
                "data": "buono.mittente",
                orderable:false,
            searchable:false    //2
            },
            {
                "data": "buono.prov_mittente",
                orderable:false,
            searchable:false //3
            },
            {
                "data": "buono.destinatario",
                orderable:false,
            searchable:false //4
            },
            {
                "data": "buono.loc_destinatario",
                orderable:false,
            searchable:false //5
            },
            {
                "data": "buono.prov_destinatario",
                orderable:false,
            searchable:false //6
            },
            {
                "data": "buono.n_bancali",
                orderable:false,
            searchable:false //7
            },
            {
                "data": "buono.n_bxd" //8
            },
            {
                "data": "buono.data_bxd",
                orderable:false,
            searchable:false    //9
            },
            {
                "data": "buono.autista" //10
            },
            {
                "data": "cond.zona",
                orderable:false,
            searchable:false
        } //11


],

Answers

  • antoniocibantoniocib Posts: 277Questions: 62Answers: 1

    I solved in this way!

    dataSrc: ['buono.autista', 'buono.n_bxd'],
    
Sign In or Register to comment.