datatable js show hide column code example
Example 1: datatables dynamically hide columns
const table = $('#example').DataTable();
// Get the column API object
const column = table.column( 2 ); // gets 2nd column (0-indexed)
// Toggle the visibility
column.visible( ! column.visible() ); // true or false
Example 2: datatables hide showing entries
// pre v1.10
$('#example').dataTable({
bInfo : false
});
// v1.10+
$('#example').DataTable({
info : false
});