Get started with datatables.net-rowgroup-bs CDN
MIT licensed
Datatables.net row grouping plugin adds Bootstrap-styled row grouping to tables.
Tags:- row grouping
- DataTables
- jQuery
- table
- Bootstrap
Stable version
Copied!
How to start using datatables.net-rowgroup-bs CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with datatables.net-rowgroup-bs CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/rowgroup/1.5.0/css/rowGroup.bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<table id="example" class="table table-bordered table-striped">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
</thead>
</table>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="https://cdn.datatables.net/rowgroup/1.5.0/js/dataTables.rowGroup.min.js"></script>
<script src="https://cdn.datatables.net/rowgroup/1.5.0/js/dataTables.bootstrap.min.js"></script>
<script>
$(document).ready(function() {
$('#example').DataTable({
data: [
{ name: 'John Doe', age: 25, city: 'New York' },
{ name: 'Jane Doe', age: 30, city: 'Los Angeles' },
{ name: 'Mike Doe', age: 35, city: 'Chicago' },
{ name: 'Sarah Doe', age: 40, city: 'Miami' },
{ name: 'Tom Doe', age: 45, city: 'Boston' },
{ name: 'Mark Doe', age: 50, city: 'San Francisco' }
],
columns: [
{ data: 'name' },
{ data: 'age' },
{ data: 'city' }
],
order: [[1, 'asc']],
rowGroup: {
dataSrc: 'age'
}
});
});
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!