Add data to each cell in a row
Add data to each cell in a row
Hi,
I have a strange setup. Have not used the ajax stuff. I get data from mysql and loop out the td's. Not
the best way, but I need <span> etc I do not like having that in the server code.
Anyway, I get the results and everything is great. Then I save some data back to mysql and retrieve the new data back from server. Here comes the problem. If I added a search to the table the list have changed from the initial way with much more data from server. So I thought ok. I have the current searched rows and each index. So I want to change one row. But it should affect the hole datatable object not only the visible stuff. If I have a large paginated list this must work.
How can I do this?
Here is my current code:
pl.adata.cell(0, 1).data('hello');
pl.adata.rows().invalidate().draw();
Nothing happens when I do this. Please help :)
Answers
Try something like this in your javaScript
Oh thank you! Great stuff. But what if I only want to chance some of them not all?
And also for a hidden row on the next page? Thanks man!