• Resolved jahlrep

    (@jahlrep)


    Hi Tobias

    Do I have a chance to access the row content of invisible rows? The rows are invisible because of a filter.

    test.sti-bearings.com
    When entering some numbers in the third column of this page and then pressing the button <Anfrage senden> everything works fine. But when using a filter just the filtered rows are processed.

    I’m using this JS code to access the row content:
    arrArtNr = Array.prototype.slice.call(document.getElementById(“tablepress-1”).getElementsByClassName(“column-1”)),
    arrAnz = Array.prototype.slice.call(document.getElementById(“tablepress-1”).getElementsByClassName(“anz”));

    Is there a better way to access all the rows?

    Thanks
    J?rg

    https://www.ads-software.com/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Do you mean a filter/search on the frontend? If so, you would have to use the API functions of the DataTables JavaScript library to retrieve the rows. DataTables basically stores them internally and only adds the visible rows to the DOM (the HTML that is rendered).
    For more information on that, please see the documentation of the DataTables JS library at https://www.datatables.net/reference/api/

    Regards,
    Tobias

    Thread Starter jahlrep

    (@jahlrep)

    Hi Tobias

    many thanks for your quick support!!!

    Do you have an example how to access the DataTbale? I have to do this with jQuery?

    Thanks
    J?rg

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi J?rg,

    no, sorry, I don’t have an example for that ?? You’d have to check the DataTables website for that. The code will indeed be a mixture of jQuery and DataTables API code.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JS access of invisible rows’ is closed to new replies.