How to hide a Column when Exporting DataTable into PDF file
How to hide a Column when Exporting DataTable into PDF file
![MichaelLand](https://secure.gravatar.com/avatar/049bdcaac74036eb06fb220c6b7b72fc/?default=https%3A%2F%2Fvanillicon.com%2F049bdcaac74036eb06fb220c6b7b72fc_200.png&rating=g&size=120)
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);
}