Button Placement in DataTable 2

Button Placement in DataTable 2

NoBullManNoBullMan Posts: 95Questions: 28Answers: 2

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
How do I place export to Excel and export to CSV buttons on top of the table between page length (topLeft) and search (topRight), same row?
I tried topCenter but it seems to take the whole row and pushes page length and search to next row.

Answers

  • allanallan Posts: 64,918Questions: 1Answers: 10,751 Site admin

    There isn't a topCenter (because then we might end up with topStartCenterCenter or something mad!). Instead you can use an array:

    layout: {
      top: [ 'pageLength', 'buttons', 'search' ],
      topStart: null,
      topEnd: null
    }
    

    Allan

  • NoBullManNoBullMan Posts: 95Questions: 28Answers: 2

    Thank you Allan.
    Is it possible to add some blurb above data table and below pagelength/buttons/search? Something like "Click on the label to view details".

Sign In or Register to comment.