how to set cell value

how to set cell value

evansmithevansmith Posts: 1Questions: 1Answers: 0

Hello,

This has been discussed in several threads, but I am still having trouble.
I wish to change the value of a cell.

I have a different cell that I click on, say a button. And then I get a call back.
I then proceed to try and change the "text" in another cell in the same row.
I am able to get the text to change, works quick and fine.

But when I go to another page in my app and come back the datatable renders without the change. So I assume, based on the threads here, that I have not changed the "object" that is held by the table, only perhaps the "array" that is thrown away.

However, not clear where I went wrong.

Here is some of my code

var the_row = myPredictions.row($(this).parents('tr'))
// this updates the display value to "foo"
myPredictions.cell({row: the_row.index(), column:9}).data("foo").draw()

How do I change the undrerlying object in column 9 on this row, not just the display value to the string "foo"

thanks!

Have been at this for awhile ... sadly.

This discussion has been closed.