column hidding not working
column hidding not working
![itassets](https://secure.gravatar.com/avatar/8a98fe44fe608de2375c7fb10696ee46/?default=https%3A%2F%2Fvanillicon.com%2F8a98fe44fe608de2375c7fb10696ee46_200.png&rating=g&size=120)
This is not working any clue?
function hideColumns(hiddenCol){
// hide columns in table
console.log('hidding: ' + hiddenCol);
$('#example').dataTable( {
"columnDefs": [
{ "visible": false, "targets":hiddenCol }
]
} );
}
This discussion has been closed.
Answers
Sorry missed to post it but I need to trigger the function hideColumns after the table has been initializated and after the user has selected the column to hide.
Why not use ColVis?
http://datatables.net/extensions/colvis/