DataTables Buttons — buttons under table
-
Hello.
How I can place the buttons below the table?
-
Hi,
thanks for your question, and sorry for the trouble.
This should be possible by pasting “Custom Command” like
"dom": "lfrtipB"
into the “Custom Commands” textfield on the “Edit” screen of the table.
TheBstands for the Buttons Extension, while the other letters stand for the other regular table elements, according to the DataTables Documentation at https://datatables.net/reference/option/domRegards,
Tobias-
This reply was modified 8 years, 11 months ago by
Tobias Bäthge.
Excellent! Thanks for the quick ansewr. How to change the labels on the buttons globally and to each table?
Thanks.
Hi,
Good to hear that this helped!
Changing these labels is a bit more tricky, unfortunately. The DataTables documentation offers two ways: https://datatables.net/extensions/buttons/examples/column_visibility/text.html
Your best chance might therefore be to use the TablePress Extension from https://tablepress.org/extensions/change-datatables-strings/ and insert something likebuttons: { print: "Print this" }as an extra entry. I have never tried this myself though.
Regards,
TobiasGood. I will try it.
And the last question. Sorry for bothering) How I can use “Use DataTales” without “Table Head Row”?
I have tables that do not have Table Head Row. I’m forced to add an empty row and hide it via css (display: none), which is not entirely correct, but! when the pdf is rendered the hidden row of head displayed as black row.
Hi,
unfortunately, using DataTables without the Table Head Row is not possible. This is a requirement of the external JS library, I’m afraid.
The approach of adding an empty row and hiding it via CSS is the only way that I know as well.
Regards,
TobiasI understood.
Your tip with buttons helped. Everything is working.
Thanks for the help. It was very fast)
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
TobiasP.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
Hello!
I again have a question)
How can I change the placeholder of a table with a specific ID.
I know how to change it globally, but I do not know how to do it for the table I need.
I ask for your help. Thank you.Hi,
what do you mean with “placeholder” here?
Regards,
Tobias“searchPlaceholder” for search input field
Hi,
ah, ok. That’s tricky.
You could try to experiment with a “Custom Command”:"language": $.extend( {}, DataTables_language["en_US"], { "searchPlaceholder": "Customized placeholder" } )Regards,
TobiasThank you. It worked! You, as always, helped in time.
I tried to solve this problem like here: https://datatables.net/reference/option/language.searchPlaceholder
But it did not work (Hi,
the code that you found should also work, but it would override the global language settings, that’s why we need to merge the objects.
Regards,
TobiasI chose your method. Thank you)
Hi,
no problem, you are very welcome! 🙂
Best wishes,
Tobias -
This reply was modified 8 years, 11 months ago by
The topic ‘DataTables Buttons — buttons under table’ is closed to new replies.