Print Display Header logo and column custumization.

Print Display Header logo and column custumization.

jpietrogiovannajpietrogiovanna Posts: 3Questions: 0Answers: 0
edited May 2021 in Buttons

I am looking to create a custom print display page using data tables.
I would like to add a logo at the top left corner or in the middle.
I would also like to set my records to display and populate with all their sub-columns in three different columns.
I will attach a screenshot for a point of reference.

Replies

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

    Please show us your DataTables initialisation code.

  • jpietrogiovannajpietrogiovanna Posts: 3Questions: 0Answers: 0

    It is a normal instantiation


    buttons: [{ extend: 'print', customize: function (win) { $(win.document.body) .css('font-size', '10pt') .prepend( '<img src="http://datatables.net/media/images/logo-fade.png" style="position:absolute; top:0; left:0;" />' ); $(win.document.body).find('table') .addClass('compact') .css('font-size', 'inherit'); }, exportOptions: { columns: ':visible' } } ],
  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    That's not supported, I'm afraid.

    Colin

  • jpietrogiovannajpietrogiovanna Posts: 3Questions: 0Answers: 0

    Which part? The header logo, or the column customization?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    The columns aren't supported. This thread may help with the logo.

    Colin

This discussion has been closed.