Use API functions with FixedColumns
Use API functions with FixedColumns
Kulgar
Posts: 4Questions: 0Answers: 0
Hi everyone !
I have an issue when I try to use API functions on fixed columns (I used your extra named "FixedColumns").
For instance, if I want to get the position of a cell, using: fnGetPosition on my DataTable, I've got the error:
[code]
TypeError: oData is undefined:
if ( oData.nTr !== null )
[/code]
I'm calling the function directly on the DataTable instance (oTable). But maybe I'm not using it the right way to get the position of a cell in fixed columns?
I've already searched older discusions and did not find the answer... but I'm not the only one who asked such thing about FixedColumns.
So if anyone can help me, I'm sure it'll help a lot other people!
Thanks in advance,
Kulgar.
I have an issue when I try to use API functions on fixed columns (I used your extra named "FixedColumns").
For instance, if I want to get the position of a cell, using: fnGetPosition on my DataTable, I've got the error:
[code]
TypeError: oData is undefined:
if ( oData.nTr !== null )
[/code]
I'm calling the function directly on the DataTable instance (oTable). But maybe I'm not using it the right way to get the position of a cell in fixed columns?
I've already searched older discusions and did not find the answer... but I'm not the only one who asked such thing about FixedColumns.
So if anyone can help me, I'm sure it'll help a lot other people!
Thanks in advance,
Kulgar.
This discussion has been closed.
Replies
[quote]
Yes - don't do it on a fixed column :-). You need to either convert from the fixed column row index to the DataTables index or to the node int he DataTable (I'd suggest the latter).
Possibly FixedColumns should cope with this, but it isn't extending the fnGetPosition method at all, and obviously DataTables has no idea that the DOM has been manipulated by the plug-in - it has no knowledge of how the plug-in works.
In general I'd say avoid using fnGetPosition altogether in fact. Work with nodes as much as possible.
[/quote]