How to refresh datasource?

How to refresh datasource?

jbsg001jbsg001 Posts: 1Questions: 1Answers: 0

if I get the datasource from ICE service per minutes.How can I refresh the dataTables's data?

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75
    edited November 2015

    Well... What kinda data source is it? Kinda need details buddy ;-)

    If its DOM sourced, then you can just update the DOM and use the invalidate().

    If its JSON/JS, then you need to clear() the table then use rows.add() to add the rows.

    If its AJAX, then you would just use the ajax.reload().

    However, if it IS ajax, then I have a plugin I just got finished creating the Beta version for, Live Ajax, which instead of updating the entire table, it will check for any updates whenever you specify (either manually or every N seconds), then only update the necessary rows (need to have rowId specified for that though). Here are some examples!

This discussion has been closed.