Hiding a DataTables column without removing it from the DOM
Sometimes you want to hide a column in a DataTable but keep its data in the DOM – maybe you need it for export, for a tooltip, or for some other operation that happens after the table renders. Removing the column entirely means losing that data, which isn’t always an option. The fix is embarrassingly simple: CSS. The setup Add a class to the column you want to hide using the sClass option in your DataTables initialisation: ...