In reference to a previous blog post on the implementation of DataTables. This blog post will be about how I hide columns in tables so that other functionalities can be used from DataTables in a different way.
Scenario: You have a set of data that needs to be ordered by the date the user confirmed their email address but you do not want to display the date. First, make a table as below and add inline styles for the column (eg 'email_confirmation') that you do not want to show by adding "display:none".
Then in your JS add the below code.
Scenario: You need to export a whole DB table either to print it or save it as an excel but you don't want to display all columns on your web page.
First make a table with the inline styles as per the previous example
Then in your JS add the below:
and in your CSS add the below: