column hidding not working
column hidding not working
itassets
Posts: 17Questions: 1Answers: 0
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/