buttons and Show entries

buttons and Show entries

jamarchijamarchi Posts: 5Questions: 2Answers: 0

Hi, I´m new using DataTables but I really like this

I have a question, I could add export buttoms but now I can´t see the Show entries comboox, Is there a way to move the buttons and that Show entries comboox appears ?

thank you

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 5,541Questions: 19Answers: 1,232
  • jamarchijamarchi Posts: 5Questions: 2Answers: 0

    Hi Kevin, thank you for your answer, look I added this code but doesn´t show correctly and I can´ translate "Show 10 rows", Thank you for your help

    dom: 'Bfrtip', lengthMenu: [ [ 10, 25, 50, -1 ], [ '10 Filas', '25 Filas', '50 Filas', 'Mostrar todo' ] ],

  • kthorngrenkthorngren Posts: 5,541Questions: 19Answers: 1,232
    Answer ✓

    dom: 'Bfrtip'

    You need to add the l parameter of dom option.

    Kevin

  • jamarchijamarchi Posts: 5Questions: 2Answers: 0

    Hi

    I changed as you mentioned... but now I can´t see the export buttons
    ```dom: 'lfrtip',
    lengthMenu: [
    [ 10, 25, 50, -1 ],
    [ '10 Filas', '25 Filas', '50 Filas', 'Mostrar todo' ]
    ],
    buttons: [
    { extend: 'pdf', text: '<i class="fas fa-file-pdf fa-1x" aria-hidden="true"> Exportar a PDF</i>' },
    { extend: 'csv', text: '<i class="fas fa-file-csv fa-1x"> Exportar a CSV</i>'},
    { extend: 'excel', text: '<i class="fas fa-file-excel" aria-hidden="true"> Exportar a EXCEL</i>' },
    'pageLength'
    ],

  • tangerinetangerine Posts: 2,296Questions: 18Answers: 255
    Answer ✓

    It's because you removed the B from your dom options.

  • jamarchijamarchi Posts: 5Questions: 2Answers: 0

    Ah ok, Great, thank you for your help

Sign In or Register to comment.