Migrating from 1.9.4 to 1.10.9. fnUpdate() and cell().data() ?
Migrating from 1.9.4 to 1.10.9. fnUpdate() and cell().data() ?
datatableryopmailcom
Posts: 9Questions: 3Answers: 0
I've used
oTable.fnUpdate( New_Data, row_id, column_id, false, false );
Now I'm using:
oTable.cell( row_id, column_id ).data( New_Data );
It works wrong. It used wrong row_id, but the same column_id.
How shall it be properly replaced for new Api?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Adding: This happens certainly after "Sorting".
Means, new api takes right place, but before sorting, and after sorting this place is wrong and it used it.
We'd need a link to a test case showing the issue please. What is
row_id
andcolumn_id
for example?Allan
It is from old Api:
As it is referenced: http://legacy.datatables.net/ref
Parameter: fnUpdate
Type: function
Inputs:
{object|array|string}: Data to update the cell/row with
{node|int}: TR element you want to update or the aoData index
{int}: The column to update (set to undefined to update the whole row)
{bool} [default=true]: Redraw the table or not
{bool} [default=true]: Perform pre-draw actions or not
Returns: {int}: 0 on success, 1 on error
So, row_id and column_id are Ints.
Number of column and number of row -> Cell.
If
row_id
is an integer then it is treated as the row index (not the row id which is different). However, the legacy fnUpdate method would treat it the same way.We'd need a link to the page to offer any help.
Allan