Set sAjaxSource, but don't want ajax call until pagination

Set sAjaxSource, but don't want ajax call until pagination

pierrepierre Posts: 1Questions: 0Answers: 0
edited February 2010 in General
Hi,

I want to use ajax to display data, but not the first time the page load.

Is it possible ?

Thx

Replies

  • allanallan Posts: 63,695Questions: 1Answers: 10,500 Site admin
    What kind of Ajax? Server-side processing, or loading a JSON file and processing on the client-side?

    There isn't an 'easy' one liner for either solution I'm afraid - as swapping between data sources isn't really something that's supported. Having said that, it is possible. What you can do is after the table has initialised is to access the settings object (fnSettings) and set oFeatures.bServerSide for server-side processing. With the JSON file, it is probably easiest just to use fnReloadAjax ( http://datatables.net/plug-ins/api#fnReloadAjax ).

    Allan
This discussion has been closed.