If I'm not mistaken, you want the pagelength and export buttons to be displayed at the same time. Like me, instead of going to the native lunge, you can get a really nice click on the button down with the code below, in addition to your main export buttons. You just need to pass the argument to "pageLength" to initialize the DT with an extra button, which will be the placeholder for the page length. An example will be.
$(document).ready(function() { $('#example').DataTable( { dom: 'Bfrtip', // Configure the drop down options. lengthMenu: [ [ 10, 25, 50, -1 ], [ '10 rows', '25 rows', '50 rows', 'Show all' ] ], // Add to buttons the pageLength option. buttons: [ 'pageLength','excel','print' ] }); });
Remember to include select js and css. Here you can find
source share