In the Datatables API notes you can toggle column visibility https://datatables.net/extensions/buttons/examples/column_visibility/columns.html :
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
{
extend: 'colvis',
columns: ':not(:first-child)'
}
]
} );
} );
But is there a way to select a column vie mouse click as you would select a row - ie let the user know the column is selected by highlighting the column - and access the data in that column from javascript (for example add another column after the selected column or delete the selected column and re-load table, calculate stats on data in the column etc..?)