Best Practice to add print CSS style to DataTable header and footer

Best Practice to add print CSS style to DataTable header and footer

daytonoutardaytonoutar Posts: 25Questions: 7Answers: 1

I need to hide the page length dropdown, buttons extension and paging when printing.

I could do this in initComplete callback and find the necessary enclosing HTML elements for the mentioned controls through the settings parameter (or I could make reference to the DataTable using this keyword). But what is the best practice.

I'm using the Semantic UI styling

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    If you use DataTables' own "Print" button, those things are excluded by default. At least, that's what's happening for me.
    No idea about Semantic UI though.

  • daytonoutardaytonoutar Posts: 25Questions: 7Answers: 1

    Tangerine,

    I forgot to mention that I must print the row groupings while using the RowGroup extension.

    When using the "Print" button, the row grouping is ignored. This is why I am taking this route to ignore the Buttons extension for this task.

    If you find a way for me to have RowGroup be acknowledged in "Print" it would be really nice because I like the extension.

This discussion has been closed.