Reputation: 36947
So, I have a table that updates at regular intervals using a heartbeat method, of which I have no problem updating data visually within the given columns of any given row as the need requires. However the data for the API to use for sorting, and all that datatables does in the background is lost, as my method doesn't use the API respectively.
It just finds a class that I gave the row tr
itself then finds td
within matching the column(s) I need to update at the time.
So I am trying to figure out how to update any given row and any given column(s) within that row on the fly. Or is there a way to get datatables to refresh what it knows, without having to reload the page or destroy the table, to completely redraw it.
Upvotes: 0
Views: 218
Reputation: 8706
Use fnUpdate
from the API in your "heartbeat method".
It has flexible parameters that let you update any row/column/cell on the fly.
I've created a little demo here that updates 1st row upon a button click.
Upvotes: 1