export specific columns(they change on the run) using export buttons

export specific columns(they change on the run) using export buttons

tsprasanthtsprasanth Posts: 5Questions: 2Answers: 1
edited March 2016 in Free community support

I am using
exportOptions: {
columns: aColumnsExport
}
to export columns for pdf but i want to change aColumnsExport on the run and get reflected while taking PDF. Is it possible because once aColumnsExport is set its not getting changed.

I also used
new $.fn.dataTable.Buttons( table, {
buttons: [
{
extend: 'pdf',
text: '',
exportOptions: {
columns: aColumnsExport,
}
}
]
} );

when ever aColumnsExport changes i called the new instance but still didnt work

I also used
var buttonCommon = {
exportOptions: {
columns: aColumnsExport
}
};
"buttons": [
$.extend( true, {}, buttonCommon, {
extend: 'copyHtml5'
} ),
$.extend( true, {}, buttonCommon, {
extend: 'excelHtml5'
} ),
$.extend( true, {}, buttonCommon, {
extend: 'pdfHtml5'
} )
]

and called

buttonCommon = {
exportOptions: {
columns: aColumnsExport
}
};

when ever aColumnsExport gets changed but still didnt work
thanks in advance

This discussion has been closed.