DataTables buttons removes the length menu

DataTables buttons removes the length menu

BesterBester Posts: 3Questions: 1Answers: 0

Hi,

After I add the Copy, Print etc buttons on my datatable it removes the "Show N Entries" drop down.

Is it possible to have the export buttons as well as be able to select the amount of lines to show on the page?

Thanks.

Answers

  • BesterBester Posts: 3Questions: 1Answers: 0

    I managed to get the answer. Had to add 'l' to the dom property

  • Christer_FChrister_F Posts: 2Questions: 0Answers: 0

    Hm. Can you explain what you mean by "adding |" and how you did this?

  • BesterBester Posts: 3Questions: 1Answers: 0

    Here is what I used to add the buttons to the datatable for the export etc:
    http://datatables.net/reference/button/#tabletools
    Note the dom: 'Bfrtip', property does not have the letter 'L' in it.

    Referring to this you will note that adding 'L' to the dom property adds the length selector:
    http://datatables.net/reference/option/dom

    So the final dom should look like this:

    dom: 'Blfrtip',
    (note the additional 'L' after the 'B' character)

    This will give you the export buttons and you can also select the row count to show.

    Hope this helps

  • Christer_FChrister_F Posts: 2Questions: 0Answers: 0

    OK, thanks. Clear! I didn't read your "L" as an L but as a vertical bar! Works fine.

This discussion has been closed.