How to hide a Column when Exporting DataTable into PDF file
How to hide a Column when Exporting DataTable into PDF file
MichaelLand
Posts: 26Questions: 0Answers: 0
Hello All,
I have tried to hide a Column from my Table when Exporting it into PDF file.
Code that below hides the column when pressing PDF Export-button but File Save as Dialog is not open...
How to get that Save as Dialog to work?
Thanks,
Mike
"fnClick": function (nButton, oConfig, oFlash) {
datatable.fnSetColumnVis(7, false);
$('div.dataTables_scrollHead').show();
$(window).keyup(function () {
oTable.fnSetColumnVis(7, true);
});
}
I have tried to hide a Column from my Table when Exporting it into PDF file.
Code that below hides the column when pressing PDF Export-button but File Save as Dialog is not open...
How to get that Save as Dialog to work?
Thanks,
Mike
"fnClick": function (nButton, oConfig, oFlash) {
datatable.fnSetColumnVis(7, false);
$('div.dataTables_scrollHead').show();
$(window).keyup(function () {
oTable.fnSetColumnVis(7, true);
});
}
This discussion has been closed.
Replies
"mColumns": [0, 1, 2, 3, 4, 6]
I tried code like this but didn't work. Can anyone please help, thanks
"mColumns": function () {
datatable.fnSetColumnVis(datatable.oSettings.aoColumns.length - 1, false);
}