I am using DataTables with Jquery. The table uses the column selector button 'colvis':
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
'colvis'
]
} );
} );
When I select a column to remove visibility, it seems to delete the <td> from the dom, rather than make it's width 0 or set the visibility to hidden. I know the data is somewhere, because showing the column again restores the <td>.
Is there any way to access the data while it is hidden?
You can use the API for that.
In this example you can hide some columns and it will still return 'Accountant' from the first record, whether that column is hidden or not.