printing columns

printing columns

karaakaraa Posts: 5Questions: 2Answers: 0

i want to select select rows and print two columns (name and salary) with modal popup how can i do it? please help

Answers

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    edited August 2022

    The print button has a exportOptions configuration parameter, which you can use to select the columns (buttons.exportData()) - e.g.:

    {
      extend: 'print',
      exportOptions: {
        columns: [0, 1],
        modifier: { selected: true }
      }
    }
    

    You can also use the selector modifier as I have above to pick only the selected rows.

    Allan

Sign In or Register to comment.