After i hide columns at initial datatable phase, the function fnGetNodes() just return columns which set visile to display, Is there aother api i can use to get the entire table row(include hided columns)?
fnGetNodes will get the TR element, rather than TDs - so I presume you are just doing a DOM query to get the TD elements required - in which case, you are absolutely correct, the hidden TDs are removed (for the reason that they are not to be displayed!).
If you want the hidden TD elements during the normal flow you need to get them from the internal store that DataTAbles keeps for them.
[code]
var aoData = oTable.fnSettings().aoData;
var aiPos = oTable.fnGetPosition();
var nTd = aoData[ aiPos[0] ]._anHidden[ aiPos[1] ];
[/code]
That should do it.
It would probably be good to have this wrapped into an API plug-in function which will take something like:
fnGetTd( row TR | position , TD index );
and that would abstract out the complication of getting hidden data...
Replies
If you want the hidden TD elements during the normal flow you need to get them from the internal store that DataTAbles keeps for them.
[code]
var aoData = oTable.fnSettings().aoData;
var aiPos = oTable.fnGetPosition();
var nTd = aoData[ aiPos[0] ]._anHidden[ aiPos[1] ];
[/code]
That should do it.
It would probably be good to have this wrapped into an API plug-in function which will take something like:
fnGetTd( row TR | position , TD index );
and that would abstract out the complication of getting hidden data...
Added to the to do list :-)
Allan