lenghtmenu is hidden when using export ?

lenghtmenu is hidden when using export ?

IssaIssa Posts: 16Questions: 3Answers: 0
edited June 2016 in Free community support

Hello,
when i do this :

$(document).ready(function() {
    $('#example').DataTable();
} );

i have the choice to show all information on my table

now i need to export some table in pdf or excell :
so i added this :

$(document).ready(function() {
    $('#example').DataTable( {
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    } );
} );

and the lenght menu is hidden ?

i have try to add this :

$(document).ready(function() {
    $('#example').DataTable( {
         "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'pdf', 'print'
        ]
    } );
} );

but no way to show the leghtMenu, someone know where is the length menu please ?

Answers

  • IssaIssa Posts: 16Questions: 3Answers: 0
    edited June 2016

    Hello ok i have an exemple here :

    https://jsfiddle.net/8qsmz3f2/7/

    when u export u don't have the 2 first ligne and missing the grouped ligne
    and whe u export all ligne are not in export why please ?

  • IssaIssa Posts: 16Questions: 3Answers: 0

    anyone have a clue please

  • allanallan Posts: 63,208Questions: 1Answers: 10,415 Site admin

    I'll write an FAQ about this on Moday as there are a lot of other threads about this. You have to add the l option into your dom parameter.

    An alternative option is to use the pageLength button type - see this example.

    Allan

This discussion has been closed.