Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    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.
    The B stands 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/dom

    Regards,
    Tobias

    • This reply was modified 7 years, 4 months ago by TobiasBg.
    Thread Starter isprite

    (@isprite)

    Excellent! Thanks for the quick ansewr. How to change the labels on the buttons globally and to each table?

    Thanks.

    Plugin Author TobiasBg

    (@tobiasbg)

    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 like

    buttons: {
        print: "Print this"
    }

    as an extra entry. I have never tried this myself though.

    Regards,
    Tobias

    Thread Starter isprite

    (@isprite)

    Good. 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.

    Plugin Author TobiasBg

    (@tobiasbg)

    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,
    Tobias

    Thread Starter isprite

    (@isprite)

    I understood.

    Your tip with buttons helped. Everything is working.

    Thanks for the help. It was very fast)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter isprite

    (@isprite)

    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.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    what do you mean with “placeholder” here?

    Regards,
    Tobias

    Thread Starter isprite

    (@isprite)

    “searchPlaceholder” for search input field

    Plugin Author TobiasBg

    (@tobiasbg)

    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,
    Tobias

    Thread Starter isprite

    (@isprite)

    Thank 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 (

    Plugin Author TobiasBg

    (@tobiasbg)

    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,
    Tobias

    Thread Starter isprite

    (@isprite)

    I chose your method. Thank you)

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ??

    Best wishes,
    Tobias

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘DataTables Buttons — buttons under table’ is closed to new replies.