PDF Export with Custom Order - Column Headings not changing
PDF Export with Custom Order - Column Headings not changing

in Buttons
Link to test case: https://live.datatables.net/cahacagi/1/edit
Debugger code (debug.datatables.net): Cant seem to get that to work
Error messages shown: None
Description of problem:
Hi
In the example, PDF button - it has a custom order set exportOptions: { columns: [3,4,5,2] } - in the PDF the data in the columns reflects this order but the headings dont - should be D E F C not C D E F
Hope I have not missed something obvious
Let me know if you need more information.
Thanks
pete
Replies
Hi Pete,
You haven't missed anything - that unfortunately is a bug (see also this thread). I'll look into it, hopefully later today, but there is a good chance it will fall into tomorrow with how my day is going so far!
Allan
I've just committed a change to DataTables to resolve this. I've added tests and documented what the column order should be based on the selector given. The nightly build will be up to date with the change shortly.
Allan
Hi Allan
I really appreciate the rapid response on this one - always excellent service here.
I am just testing this using the nightly builds (which has the listed changes - or at least I think it does) but I still cant get it to output correctly.
I am a bit of a muppet and impatient so apologies, here is an updated test case using the nightly builds:
https://live.datatables.net/cahacagi/2/edit
Keeps outputting C D E F
Thanks for the help
pete
Hi Pete,
I think you'll have been getting an edge cached version of the nightly. Adding a unique value to the end of the address forces it to get a fresh copy. Adding today's date at the end lets it get the latest build and the example works: https://live.datatables.net/cahacagi/4/edit .
Regards,
Allan
sneaky badger - knew it was my fault - thank you for the tip will try and remember next time
Not your fault at all. I have the cache just a little high on the nightly - otherwise I burn too much bandwidth from the origin server! The downside is that it helps to be aware of it, otherwise you might get an old version from the edge cache.
Allan