var dataSet = [
[ "Tiger Nixon", "System Architect", "Edinburgh", "5421", "2011/04/25", "$320,800", "Foo foo foo foo bla bla" ],
[ "Garrett Winters", "Accountant", "Tokyo", "8422", "2011/07/25", "$170,750", "Some very long lorem ipsum text" ],
[ "Ashton Cox", "Junior Technical Author", "San Francisco", "1562", "2009/01/12", "$86,000", "Bar bar bar bar bla bla" ],
]
$('#example').DataTable({
data: dataSet,
columns: [
{ title: "Name" },
{ title: "Position" },
{ title: "Office" },
{ title: "Extn." },
{ title: "Start date" },
{ title: "Salary" },
],
rowGroup: {
startRender: function(row, group) {
if(typeof group == "string") {
return $('<tr/>')
.append('<td colspan="6"><span>' + group + '</span></td>');
}
},
endRender: null,
className: 'table-group',
dataSrc: 6
}
});
table.dataTable tbody th, table.dataTable tbody .table-group td {
padding: 0;
}
table.dataTable tbody th, table.dataTable tbody .table-group td span {
padding: 8px 10px;
display: block;
color: silver;
}
table.dataTable tbody tr:nth-child(4n),
table.dataTable tbody tr:nth-child(4n-1) {
background-color: #eee;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css" rel="stylesheet"/>
<link href="https://cdn.datatables.net/rowgroup/1.0.0/css/rowGroup.dataTables.min.css" rel="stylesheet"/>
<script src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/rowgroup/1.0.0/js/dataTables.rowGroup.min.js"></script>
<table id="example" class="" cellspacing="0" width="100%"></table>