Custom buttons and pagination together in Datatable

0

Use the DataTable to create tables. I need to put the pagination at the top of the table too. However, I already have export buttons, so I can not put both.

Does anyone know if it is possible and how?

Follow the code in my table.

this.dtOptions = {
  scrollX: true,
  lengthChange: false,
  dom: "Bfrtip",
  pageLength: 50,
  buttons: [

      {
          extend: 'print',
          text: '<i class="fa fa-print"></i>',
          className: 'btn btn-default',
      },
      {
          extend: 'excel',
          text: '<i class="fa fa-file-excel-o"></i>',
          className: 'btn btn-default'
      },
      {
          extend: 'csv',
          text: 'CSV',
          className: 'btn btn-default'
      },
      {
          extend: 'pdf',
          text: '<i class="fa fa-file-pdf-o"></i>',
          className: 'btn btn-default',
          orientation: 'landscape',
          pageSize: 'LEGAL',
      },
      {
          extend: 'colvis',
          text: 'Colunas',
          className: 'btn btn-default',
          exclude: [ 0 ]
      },
  ],

};
    
asked by anonymous 05.06.2017 / 16:23

1 answer

0

I think because of the size of the paging, I do not think it's possible to leave the export buttons and the paging together at the top.

The closest you have to what I said is: link

    
05.06.2017 / 16:34