Chain RowGroup API
Chain RowGroup API
tablegeek
Posts: 1Questions: 1Answers: 0
Hi There
I have a data table setup as
table = $('#example').DataTable({rowGroup: {
enable: false,
},})
I have a click event where which triggers the group as needed from
$('.group-table').on('click', function(e) {
var column = table.column($(this).attr('data-group'));
table.rowGroup().enable().dataSrc((groupBy)).draw();
});
I would like to add .startRender() to the above chain and have a few updates that I would like to make.
So the code could look
table.rowGroup().enable().dataSrc((groupBy)).startRender(function(e,t){
// my code here
}).draw()
But when I try to execute it I get that startRender
is not a function. I'm looking for a correct way of targeting startRedner as chain method rather than
$('#myTable').DataTable( {
rowGroup: {
startRender: function ( rows, group ) {
return group +' ('+rows.count()+' rows)';
}
}
} );
This discussion has been closed.
Answers
Have you tried combining the options?
I haven't so not sure it will work but suspect it will.
Kevin