Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82257

Set "aaData" with a JSON, having the "bServerSide" enabled

$
0
0
I am creating a javascript application that needs to cache the DOM element into javascript's variable. I have tried to use the jQuery method $.clone(), with the "withDataAndEvents" and "deepWithDataAndEvents" enabled, to clone the dataTable's element, but all the functionalities, events e everything else stops working. So I moved on and instead to cache the DOM element, I cached the JSON (ajax response), and every time I want to use the table, I just grab the JSON and build the dataTable again. It works fine... The problem is: My dataTable has the "bServerSide" enabled, so when I try to build the dataTable again, passing the JSON, it just ignores it and call the ajax again.

I want to know if there is some way to go around first method or the another (work with the clone method or have the "aaData" setted with a JSON and the "bServerSide" enabled)

Thank you very mush

Viewing all articles
Browse latest Browse all 82257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>