Okay
  Public Ticket #3582674
Table Tool buttons and CSS
Closed

Comments

  • Rasmus Skov Larsen started the conversation

    Hi TMS Plugins. 

    I have a table that is shown on several pages on my website. Selected values in one column will add different display:none-rules that hide each of the rows on different pages.

    But when I use the Table Tool buttons all rows in the table will be printed or exported, even if they are hidden on the specific page I'm visiting. Is it possible to add CSS that prevents rows from being printed or exported when I use the buttons on a page where the rows are hidden?

    Best regards

    Rasmus

  •  1,846
    Miloš replied

    Hi Rasmus,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I am sorry to disappoint you, but we do not currently have a valid built-in solution for your Use-Case.

    If we use CSS to set 'display : none' or hide the rows in any other way with CSS - they are still being loaded for the Table Tools Export.

    The table tools functionalities are based on a 3rd party HTML5 library and they are not customizable. Unfortunately, the library allows very little “fine-tuning” of the generated files, so font, size, and other properties cannot be changed.

    There are some limitations in this library we will emphasize for your awareness:

    • For tables with server-side processing, only the visible rows will be exported to any format. If you want the entire table to be exported (or copied to a clipboard), you need to choose the “Show All” feature in the “show … entries” block, and then do the export:6992668217.png
    • Generated PDF, XLS, CSV are not customizable. Unfortunately, the library allows very little “fine-tuning” of the generated files, so font, size, and other properties cannot be changed (but the title can – see below).
    • Conditional formatting is not reflected in any of generated export files.
    • Other front-end extensions cannot be combined with Table Tools. If you have row grouping enabled for the table, or there are some customizations you did yourself, they won’t be reflected in the generated Excel, CSV or PDF document, nor in the clipboard.
    • When you export tables with the wpDataTables plugin, please note that you can export values, but not formulas. WpDataTables doesn’t support exporting formulas, so a Formula column will be exported only with values; and any calculations of Average, MIN, MAX, and Total will not be exported at all.
    • Exporting images is not possible at the moment, but you are able to export them as HTML with the new “Include HTML” option.
    • You can’t export columns that are hidden – they will not be visible in any exporting or printing tool.
    • Export numbers with comma as decimal separators have issues in the Excel report. Please use the CSV export button or change column type to string for these columns.

    -

    If you wish to try better PDF export functionalities, our advice would be to acquire something like the WP Advanced PDF plugin, which offers a lot more options when creating PDF files from our tables, along with other content on your website.


    At the moment, only if you completely prevent specific rows from loading, could be to use SQL Query Tables, with a "WHERE" statement to filter out some rows;

    but I realise this is not suitable for your specific Use-Case, since you wish to make the rows 'dynamically hide' depending on some selected values, if i understood - for that Use-Case, we, unfortunately, don't have a valid solution yet.

    You can make a future development suggestion for it.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables