Update data of a single cell

Update data of a single cell

twitttwitt Posts: 1Questions: 1Answers: 0

Hello,

i have an environment where all data automatically updates in the browser, whenever it has been changed in the database.
Therefore each displayed database value (inside a table cell) has an Id, and the server simply calls the JavaScript to replace the value with the right Id.

My Problem now is, that I dont know how to notify DataTables about that changed value.

A perfect solution would be something like this:
myDataTable.UpdateCell(cell);

I'm sure there is a solution for this and hope you can help me out.

Thanks in advance,
Timon

Answers

  • loloskiloloski Posts: 46Questions: 5Answers: 1

    a little hackish is

    setInterval(function() {
    table.ajax.reload();
    },30000); // every 30 seconds

    but this is very expensive operation and might not fit what you need :)

  • allanallan Posts: 63,765Questions: 1Answers: 10,510 Site admin

    cell().data() is the method that would be used to update the data in a cell. The cell-selector documentation details the cell selector options.

    Allan

This discussion has been closed.