Query about grouping

Query about grouping

Hi, I am passing data and columns to the DataTable using JSON array. And I'm using "rowgroup" to perform grouping based on speicfic column, but it's not working as expected. (see the attahed sceenshot). The "group" variable value is undefined.

When I passed the data to the DataTable using HTML code, it works properly.

Code snippet :

var table = $('#tblTrainerVenueList').DataTable({
"data":data, // Data JSON
"columns":dynamic_column, // Column JSON
"pageLength": 10,
"lengthChange": false,
"info": false,
"order": [[5, 'desc']],
"rowGroup": {
endRender: null,
startRender: function ( rows, group ) {
alert('rows : '+rows+ ': : '+group)
return group +' ('+rows.count()+')';
},
dataSrc: 5
}
});

1.png 417.5K

Answers

This discussion has been closed.