Question

I'm in the midst of converting some tables that are using DisplayTag over to using DataTables w/ the TableTools plugin for export. One nice thing about the former is that there's a media field for each column which specifies if that column should be present in HTML, CSV, etc such that you can have different columns in different media.

Is there some way to replicate this in the DataTable/TableTool environment? The specific use case is that a lot of our tables will have columns which are abbreviated summarizations of a few columns in the HTML display while the exported versions are intended to have the full columns.

Was it helpful?

Solution

The equivalent in TableTools is the "mColumns" option, which allows you to define 'all', 'visible', 'hidden' or an array of column indexes that you want to include in the output: http://datatables.net/extras/tabletools/button_options#mColumns

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top