Preload DataTables and use server side processing for subsequent requests

Preload DataTables and use server side processing for subsequent requests

MagicDude4EvaMagicDude4Eva Posts: 1Questions: 0Answers: 0
edited May 2011 in General
I would like to pre-load DataTables when rendering the page (via JavaScript array) and then have any subsequent requests (such as pagination) done via server-side processing.

I have provided "aaData" JavaScript array when the page initially loads, but when supplying "bServerSide=true", DataTables will issue another Ajax call.

How can I preload DataTables with JavaScript and then "switch" to server-side processing so that any subsequent requests are executed via the server-side script?

Replies

  • singingwolfboysingingwolfboy Posts: 1Questions: 0Answers: 0
    I need this functionality, as well. Is this a supported use-case for Datatables?
  • allanallan Posts: 63,540Questions: 1Answers: 10,476 Site admin
    Deferred loading is what you are looking for I think: http://datatables.net/release-datatables/examples/server_side/defer_loading.html :-)

    Allan
This discussion has been closed.