TypeError: 'undefined' is not an object (evaluating 'aoColumns[iCol].bVisible')
TypeError: 'undefined' is not an object (evaluating 'aoColumns[iCol].bVisible')
![iains](https://secure.gravatar.com/avatar/ab0f85e07e072187b121f70c49750a66/?default=https%3A%2F%2Fvanillicon.com%2Fab0f85e07e072187b121f70c49750a66_200.png&rating=g&size=120)
I have 7 tables on my page, they all have 2 fixed columns and on init I hide some of the columns they all run fine until I create a previously created table again when I get: TypeError: 'undefined' is not an object (evaluating 'aoColumns[iCol].bVisible') on line 5962 of the full stable version of datatables 1.9.4 this line is here: if ( aoColumns[iCol].bVisible == bShow )
If I remove the fixed Columns code (see immediately below) the problem goes away (but I need fixed columns!)
//fix left 2 columns
new FixedColumns( oTable, {
"iLeftColumns": 2
} );
I am using v 2.0.3 of fixed columns and have more issues with the 2.0.5 Dev version.
If I don't hide columns on init the problem also goes away. I hide by looping through the cols and doing this:
oTable.fnSetColumnVis(colsArray[i], show , false);
and on the last one this:
oTable.fnSetColumnVis(colsArray[colsLength-1], show , true)
I need a fix or pointing in the right direction please?
If I remove the fixed Columns code (see immediately below) the problem goes away (but I need fixed columns!)
//fix left 2 columns
new FixedColumns( oTable, {
"iLeftColumns": 2
} );
I am using v 2.0.3 of fixed columns and have more issues with the 2.0.5 Dev version.
If I don't hide columns on init the problem also goes away. I hide by looping through the cols and doing this:
oTable.fnSetColumnVis(colsArray[i], show , false);
and on the last one this:
oTable.fnSetColumnVis(colsArray[colsLength-1], show , true)
I need a fix or pointing in the right direction please?
This discussion has been closed.
Replies
Thanks,
Allan
> Fantastic work BTW!
Thank you :-)
Allan