Column visibility issue in Responsive Datatable
Column visibility issue in Responsive Datatable
I am toggling a Datatable column based on some condition. But it doesn't work as per the expectations. When i hide column and go to next page the column shows up there.
I am using
https://cdn.datatables.net/responsive/2.1.0/js/dataTables.responsive.js
https://cdn.datatables.net/responsive/2.1.0/css/dataTables.responsive.css"
Below is the sample code
$("#emp").click( function()
{
otable.fnFilter('Employee');
otable("aoColumns": [{"bVisible": false},null,null,null]), /* How to use this here?????
//$('tr td:nth-child(4),th:nth-child(4)').hide(); since above code didn't work i tried to use this but this didn't work either
$('#example thead #nonid').text("Employee ID");
});
Thanks in advance