oTable.fnUpdate skip a column

oTable.fnUpdate skip a column

dmayo2dmayo2 Posts: 1Questions: 0Answers: 0
edited August 2012 in General
Hello.
I'm trying to figure out how to skip a column.

For example, this works:
[code]
oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], 1, 0 ); // updates node=1, columns 0-4
[/code]

This is identical:
[code]
oTable.fnUpdate('a',1,0); // updates the column 0 in row 1 with value 'a'
oTable.fnUpdate('b',1,1); // updates column 1 in row 1
oTable.fnUpdate('c',1,2); // updates column 1 in row 1
oTable.fnUpdate('d',1,3); // updates column 1 in row 1
oTable.fnUpdate('e',1,4); // updates column 1 in row 1
[/code]

Is it possible to update columns 0,1,2,4 in one line of code? Not sure how I'd indicate in the array of the first parameter to skip that column:
[code]
oTable.fnUpdate(['a','b','c',skip,'e'],1,0);
[/code]

I've tried a couple of different ways to no avail. Thanks for any leads. -- dmayo

Replies

  • allanallan Posts: 63,540Questions: 1Answers: 10,476 Site admin
    Currently no - the array much be the same size as the number of columns, and whatever is given in each item will be used as the value. So even if you gave `undefined` that would be used. Sounds like it might be an ideal case for a plug-in API method that is tuned to exactly what you want though :-)

    Allan
This discussion has been closed.