How to update a row from external data?
How to update a row from external data?
Wilmer30
Posts: 33Questions: 10Answers: 1
Hi,
I try to update some fields in a row, the problem is that it does not work.
borrar.data()[1] = datos.rol;
borrar.data()[2] = datos.descripcion;
console.log(borrar.data()); //Here I see the changes of the data
borrar.invalidate().draw();
External data I bring from an ajax.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
That looks like it should work. What's the original data source for the table? What do you see if you do
console.log(borrar.data());
after the draw?Allan
Go back to te value:
thanks for your answer
It goes back to the original value?
In that case use:
That is reverts suggests that the table is originally sourced from HTML directly and it therefore tries to read from there again, unless told otherwise.
Allan
It will have something to do with using DataTables 1.10.12
That was the problem thank you very much allan