How to load data via ajax only on the intial load

How to load data via ajax only on the intial load

chravischravis Posts: 2Questions: 1Answers: 0

Is there a way to load the entire data set via ajax after the page loads, and then have everything after that (paging, sorting, etc) applied client-side? I'm currently using the aaData property to set my json data, but in cases where there is lots of data, it takes a while for the whole page itself to load. I'd rather the user see the screen quickly, with the "Processing..." message in the table while the entire data set is retrieved via ajax (but then ajax is no longer used on that table). Thanks for anyone's help.

Answers

  • chravischravis Posts: 2Questions: 1Answers: 0

    Well, I figured it out on my own. You can use the "sAjaxSource" property to do what I wanted. I knew this property existed, but it wasn't clear that I could use it without server side processing (bServerSide) turned on. By the way, we're using the legacy version of Datatables.

This discussion has been closed.