How to retain all rows in the DOM

How to retain all rows in the DOM

arnoldjp57arnoldjp57 Posts: 10Questions: 7Answers: 0

Hi
I have a datatable and want to send all rows back to the server with the post.
Rows are cleared out the DOM when scrolling or sorting
Is there an easy way to tell datatables to not tidy out the DOM?
I use serverside processing where I have a large no of records, and only want to retain the DOM for a specific Grid type application where I want all the data back.
Please advise

Answers

  • allanallan Posts: 52,525Questions: 1Answers: 8,020 Site admin

    If you are using server-side processing then no - the whole point of server-side processing is that only the rows which are currently visible should be in the DOM.

    Allan

  • jessicabarnesjessicabarnes Posts: 1Questions: 0Answers: 0

    It's very difficult to solve not knowing where do many variables point, so if we suppose that data.settings.pagedContent points to the on-page DOM, why finding only the elements which equal what you already have in the ajax response? If in the other hand data.settings.pagedContent is a selector, I'm wondering if the scripts are getting outside the selector. Would be very useful if you provide an ajax response example.

This discussion has been closed.