Closed marcostomazini closed 9 years ago
Solved, sorry
.withOption('fnDrawCallback', function (oSettings) { .. https://datatables.net/examples/advanced_init/row_grouping.html
Would you mind sharing the sample code of grouping ?
Sample
.withOption('fnDrawCallback', function (oSettings) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
api.column(2, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="5">'+group+'</td></tr>'
);
last = group;
}
} );
}
Awesome :+1:
Anyway in which we can make it expandable/collapsible ?
in my case I used the component
https://jquery-datatables-row-grouping.googlecode.com/svn/trunk/customization.html
The link is not available. Can give me some example ?
exists as to the grouping component ?
https://datatables.net/examples/advanced_init/row_grouping.html