Column Visibility using RTL column

Column Visibility using RTL column

domondon1domondon1 Posts: 2Questions: 1Answers: 0

Hi i have a question is this is possible in datatable plugin
I have created a sample test for it
https://live.datatables.net/koqinevo/1/edit
will the problem of this i have a column visibility button and pdf button (the pdf have rtl, that will reverse the header to right to left)
so when i selected a column that is visible, but when you download the pdf the column still there

Answers

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    In the exportOptions you have columns: [5,4,3,2,1,0]. So those columns will always be exported. Use columns: ':visible' if you only want the visible columns to be exported.

    Allan

  • domondon1domondon1 Posts: 2Questions: 1Answers: 0

    Hi allan, i want the column to reverse at the same time only those are visible

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    I see what you mean. I'm not sure there is actually a way to do that at the moment.

    That said, perhaps the PDF export should obey dir="rtl" on the html element? I see that it currently isn't: https://live.datatables.net/koqinevo/2/edit .

    I've been increasingly thinking of dropping the PDF creation with pdfmake recently. Instead I'd have a window pop open and the user would use the system's "Print to PDF" ability. That would make RTL table support for PDF export much easier (if dir="rtl" is being used).

    Is your whole page RTL?

    Allan

Sign In or Register to comment.