PDF export issue - Table with two header rows

PDF export issue - Table with two header rows

lprynnelprynne Posts: 1Questions: 1Answers: 0

I created a table with two header rows so that I could move the dropdown filters to the top of the table and not lose the column names. Everything works great until I export to PDF. When that happens, the headers in the PDF contain all of the values in dropdown filters instead of the actual headers (first thead row in html).

I am new to DataTables and my JavaScript skills are pretty weak (script for enabling dropdown filters on specific columns was harvested from a comment on DataTables site). I played around with orderCellsTop and it did not work (at least I could not make it work).

Any assistance would be greatly appreciated. Thank you.

Example:
http://live.datatables.net/caraxode/1/

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    Looks like you are placing the select inputs in the top row instead of the second. See if this example helps:
    http://live.datatables.net/saqozowe/70/edit

    It will append the selects to the th with the specified class. Note also the use of orderCellsTop.

    Kevin

This discussion has been closed.