TableTools with ColumnFilter
TableTools with ColumnFilter
khurram712
Posts: 1Questions: 0Answers: 0
Hi
I have an HTML table .At the start,The columns of the table are like this .
Job Card , Serial No , Version , Emp Num , Malfunction , Action
I applied datatable tool on it and applied two "extras" plugin named "TableTools" and "ColVIs".
ColVIs : http://datatables.net/release-datatables/extras/ColVis/index.html
Table Tools : http://datatables.net/release-datatables/extras/TableTools/index.html
The extra plugins work fine individually but they don't work with each other .
Lets say a user first deselects "version" and "Emp Num" columns(using ColVis Plugin).
Now The table has only these columns visible
Job Card , Serial No , Malfunction , Action
Now the user presses pdf button (of tabletool plugin)
The table in pdf file does have only those columns which were visible.But the data of
"Version" column will be overlapping data of " Malfunction"and data of "Emp Num"
will be mixed with "Action".
In other words,the export option doesnt correspond to the column selection.Any idea or
solution ??
I have an HTML table .At the start,The columns of the table are like this .
Job Card , Serial No , Version , Emp Num , Malfunction , Action
I applied datatable tool on it and applied two "extras" plugin named "TableTools" and "ColVIs".
ColVIs : http://datatables.net/release-datatables/extras/ColVis/index.html
Table Tools : http://datatables.net/release-datatables/extras/TableTools/index.html
The extra plugins work fine individually but they don't work with each other .
Lets say a user first deselects "version" and "Emp Num" columns(using ColVis Plugin).
Now The table has only these columns visible
Job Card , Serial No , Malfunction , Action
Now the user presses pdf button (of tabletool plugin)
The table in pdf file does have only those columns which were visible.But the data of
"Version" column will be overlapping data of " Malfunction"and data of "Emp Num"
will be mixed with "Action".
In other words,the export option doesnt correspond to the column selection.Any idea or
solution ??
This discussion has been closed.
Replies
Thanks!
[code]
"mColumns": "all"
[/code]
So I added this variable to my pdf button and it worked like a charm:
[code]
"aButtons": [ { "sExtends": "pdf", "mColumns": "visible" } ]
[/code]
The options for this variable in the code are:
all, visible, hidden, or an array of column intergers
Hope that helps!
Dave