Shipping A Full-Featured Video Calling App With Half The Effort (OpenVidu)
August 11, 2020Git Workflow With Multiple People
September 1, 2020In 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.
Example 1
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.
- The number points to the column that you are ordering the data by
- and you can either use 'desc' for descending or 'asc' for ascending order.
Example 2
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:
Happy Codding!