DataTables buttons removes the length menu
DataTables buttons removes the length menu
Bester
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.
This discussion has been closed.
Answers
I managed to get the answer. Had to add 'l' to the dom property
Hm. Can you explain what you mean by "adding |" and how you did this?
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
OK, thanks. Clear! I didn't read your "L" as an L but as a vertical bar! Works fine.