DataTables buttons, print only if visible and if not a certain class

DataTables buttons, print only if visible and if not a certain class

NoMan2000NoMan2000 Posts: 7Questions: 3Answers: 0
edited May 2016 in Free community support

I'm trying to export from DataTables in the HTML5 formats. But I can't seem to do a compound selector like ":visible :not(.noExport)"

Is there anyway to do that?

Alternatively, a combination of something being both visible and an allowed element as an array, object, or string, i.e. [0,1,2, ':visible"] or something along those lines.

This question has an accepted answers - jump to answer

Answers

  • NoMan2000NoMan2000 Posts: 7Questions: 3Answers: 0

    Alternatively, a combination of something being both visible and an allowed element as an array, object, or string

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Could you show me the code you are using, or ideally a test case please? I'm not entirely clear on where you are using this selector?

    Allan

  • NoMan2000NoMan2000 Posts: 7Questions: 3Answers: 0
    edited May 2016

    Surely.

    <deleted since Allan already saw it.>

    There's two major problems:

    1.) Everything should be output as text, not as html.
    2.) I don't know how to remove the "actions" column, since that is not part of the dataset that the client will need.

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin
    Answer ✓

    Thanks! Unfortunately that doesn't look like it is possible at the moment. jQuery uses $().filter() to do compound selectors. But there is no opertunity to use that with the export options at the moment.

    I'll need to have a think about how this can be done - I can see it would be useful, but it isn't something that is possible in the current API I'm afraid.

    Allan

This discussion has been closed.