Documentation issue with fnUpdate and row update.

Documentation issue with fnUpdate and row update.

spaschespasche Posts: 1Questions: 0Answers: 0
edited October 2012 in Bug reports
Hi,

I had some issues with fnUpdate while trying to update a row and I found out that the documentation is not exactly in sync with the code.

If you want to update a row, the third parameter must be "undefined". However, the documentation implies that it would simply be ignored if you give an array or object as first parameter. Moreover, the example in the documentation with the row update is not correct: because iColumn is 0, it will try to update the cell and not the row.

I see that the behavior changed (http://datatables.net/forums/discussion/11966/fnupdate-in-datatables-1.9.4), so the documentation should be updated.

Update proposition:

Old:
[code]
* @param {int} [iColumn] The column to update (not used of mData is an array or object)
[...]
oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); // Row
[/code]

New:
[code]
* @param {int} [iColumn] The column to update (pass no argument or undefined if mData is an array or object)
[...]
oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1 ); // Row
[/code]
This discussion has been closed.