fnGetPosition Returns "Cannot read property 'nTr' of undefined" When Called on Table w/ Fixed Cols

fnGetPosition Returns "Cannot read property 'nTr' of undefined" When Called on Table w/ Fixed Cols

tcbeatontcbeaton Posts: 16Questions: 0Answers: 0
edited March 2013 in DataTables 1.9
I have a table which is split using FixedColumns(oTable,{"iLeftColumns":5,"iLeftWidth":500});

One of the columns on the left side is "editable"; and, after editing the cell I'm trying to use "oTable.fnGetPosition(this)".

The output of "console.log(oTable.fnGetPosition(this))" is "null". If I shift the editable column to the right side of the split, the function returns three values, but the second value starts with zero for the first column to the right of the split (as though the columns to the left of the split aren't there).

The main thing I'm looking for is the first number, the row number of the cell just edited.

Thanks.

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    You are using the cloned / fixed elements to get the position? Yes, that won't work because they are clones and DataTables core has no reference to them. You need to use the original elements.

    Allan
  • tcbeatontcbeaton Posts: 16Questions: 0Answers: 0
    Hi Allan, Thanks for the input. Is there an existing way to get to the original elements from within the "callback" routine to get the row number? I've been attempting for a few days to try to get a usable result from fnGetPosition, but as you state, it's not there. Thanks, again.

    --Tom
This discussion has been closed.