How can I add checkbox with ability to 'check-all' and single check in first column of dataTable.. column which doesn't came from server-side script? So far I was able to put only at the end of table one button.
$(document).ready(function() {
$('#example').DataTable( {
"processing": true,
"serverSide": true,
"ajax": "response.php",
"aoColumnDefs": [
{
"aTargets": [7],
"mData": null,
"mRender": function (data, type, full) {
return '<a class="btn btn-info btn-sm" href=edit.php?id=' + full[0] + '>' + 'Edit' + '</a>';
}
}]
});
});
and the html part
<table id="example" class="display table table-striped table-bordered responsive">
<thead>
<tr>
<th>№</th>
<th>Program</th>
<th>Subject</th>
<th>Number</th>
<th>Description</th>
<th>Keywords</th>
<th>Action</th>
</tr>
</thead>
</table>