When pipelining data using ajax, how can I refresh table with new data?

When pipelining data using ajax, how can I refresh table with new data?

danielolivasjrdanielolivasjr Posts: 1Questions: 1Answers: 0
edited December 2017 in Free community support

I'm following the methods described here:

https://datatables.net/examples/server_side/pipeline.html

But, when I want to reload the table with new data, table.ajax.reload(); does not work. I can get it to work, if I remove the pipeline function.

Thanks,

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    settings.clearCache = false before you do the reload

  • bindridbindrid Posts: 730Questions: 0Answers: 119
    edited December 2017

    More explicitly, the pipeline code adds the clearCache to the settings object and sets it to false.

    $("#example").settings().clearCache = true;

    when you hit reload, the pipeline code will set it back to false and make a trip to the server to get fresh data.

    look at line 27 in the pipeline code

  • allanallan Posts: 63,457Questions: 1Answers: 10,466 Site admin

    Best to avoid the settings method if you can! The properties in it are considered to be internal - they can, may and do change between versions.

    The pipelining code adds a clearPipeline() method to the API so you can simply use:

    table.clearPipeline();
    

    Allan

This discussion has been closed.