fnColumnIndexToVisible - Cannot read property 'nTr' of undefined
fnColumnIndexToVisible - Cannot read property 'nTr' of undefined
mellamokb
Posts: 4Questions: 0Answers: 0
I'm trying to use the plugin method "fnColumnIndexToVisible". When I call it directly, for example to get row 0, column 3:
payTypeTable.fnColumnIndexToVisible(payTypeTable.fnSettings(), 0, 3)
I get the following error: TypeError: Cannot read property 'nTr' of undefined
However, if I manually access the extension Api and call the method, it works fine:
payTypeTable.dataTableExt.oApi.fnColumnIndexToVisible(payTypeTable.fnSettings(), 0, 3)
What would cause this behavior?
(Also, it is called "fnGetTd" in the actual code, is that supposed to match the name?)
payTypeTable.fnColumnIndexToVisible(payTypeTable.fnSettings(), 0, 3)
I get the following error: TypeError: Cannot read property 'nTr' of undefined
However, if I manually access the extension Api and call the method, it works fine:
payTypeTable.dataTableExt.oApi.fnColumnIndexToVisible(payTypeTable.fnSettings(), 0, 3)
What would cause this behavior?
(Also, it is called "fnGetTd" in the actual code, is that supposed to match the name?)
This discussion has been closed.
Replies
> Please note that DataTables will automatically pass the settings object as the first parameter. As such, you do not need to pass the settings object, which you will see if you look at the plug-in API's code.
I freely admit this is crap. The new API in 1.10 will be much more obvious (indeed, this function you are using will be built in - `column.index()` to translate to and from the visible index.
Allan