Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81929

One way to child row default show

$
0
0

This is one way to show by default a child rows of row.

function format(data){
    // Code for format data
    return 'New data with format';
}

dTable = $('#myDTable').DataTable({
    rowCallback: function(row, data, index){
    var dtApi   = this.api();
    var jqTr    = $(row);
    var dtRow = dtApi.row(row);

    if(!dtRow.child.isShown()){
        dtRow.child(format(dtRow.data())).show();
    }
});

Share this and waiting for feedback for corrections and sugestions.


Viewing all articles
Browse latest Browse all 81929

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>