Problem fnSettings().aoColumns has a null value when using FixedColumn
Problem fnSettings().aoColumns has a null value when using FixedColumn
Hi all,
I've got a problem on one of my pages with FixedColumn using IE8 (i've no choice about that, sorry :) ).
I've got 5 pages with the exact same code to use DataTable and FixedColumn. 4 of them are working well but for the last one i've got this error message (IE8 dev tools) :
[quote]
Line: 29
Error : 'fnSettings().aoColumns' has a Null value or is not an object.
[/quote]
Here is my code :
[code]
var oTable = $('#ctl00_ContentPlaceHolder2_tab_pdp').dataTable({
// height scroll
"sScrollY": tabMaxHeightPDP() + "px",
// width scroll
"sScrollX": "4060px",
"sScrollXInner": "4060px",
"bScrollCollapse": true,
// pagination
"bPaginate": true,
// show/hide columns
"sDom": 'C<"clear">lfrtip',
"oColVis": {
"aiExclude": [0, 1, 2] // colonnes à ne pas masquer
},
// init sorting
"aaSorting": [[1, "asc"]]
});
new FixedColumns(oTable, {
// three fixed columns
"iLeftColumns": 3,
"iLeftWidth": 560
});
[/code]
Thanks ;)
I've got a problem on one of my pages with FixedColumn using IE8 (i've no choice about that, sorry :) ).
I've got 5 pages with the exact same code to use DataTable and FixedColumn. 4 of them are working well but for the last one i've got this error message (IE8 dev tools) :
[quote]
Line: 29
Error : 'fnSettings().aoColumns' has a Null value or is not an object.
[/quote]
Here is my code :
[code]
var oTable = $('#ctl00_ContentPlaceHolder2_tab_pdp').dataTable({
// height scroll
"sScrollY": tabMaxHeightPDP() + "px",
// width scroll
"sScrollX": "4060px",
"sScrollXInner": "4060px",
"bScrollCollapse": true,
// pagination
"bPaginate": true,
// show/hide columns
"sDom": 'C<"clear">lfrtip',
"oColVis": {
"aiExclude": [0, 1, 2] // colonnes à ne pas masquer
},
// init sorting
"aaSorting": [[1, "asc"]]
});
new FixedColumns(oTable, {
// three fixed columns
"iLeftColumns": 3,
"iLeftWidth": 560
});
[/code]
Thanks ;)
This discussion has been closed.
Replies
What i find strange in your example is that the aoColumns variable does not appear at all in your initialization.
Maybe you could try to define this variable and see if this helps ?
Like so :
[code]
var aoColumns = new Array();
$('thead th').each( function () {
aoColumns.push({ null });
}
var oTable = $('#ctl00_ContentPlaceHolder2_tab_pdp').dataTable({
// height scroll
"sScrollY": tabMaxHeightPDP() + "px",
// width scroll
"sScrollX": "4060px",
"sScrollXInner": "4060px",
"bScrollCollapse": true,
// pagination
"bPaginate": true,
// show/hide columns
"sDom": 'C<"clear">lfrtip',
"oColVis": {
"aiExclude": [0, 1, 2] // colonnes à ne pas masquer
},
// init sorting
"aaSorting": [[1, "asc"]]
// CALL VAR HERE
,"aoColumns": aoColumns
});
new FixedColumns(oTable, {
// three fixed columns
"iLeftColumns": 3,
"iLeftWidth": 560
});
[/code]
I've just tried your example and it doesn't solve my problem and i got an error on the line
[code]aoColumns.push({ null });[/code]
so i removed it and tried to init this value anyway not with success.
I tried to initialize the aoColumns like that :
[code]"aoColumns":[null, null,null, etc... ][/code]
and replacing the "null" thing by a type like i've seen some other place on this forum but i still have this issue.
If that can help, i have 3 fixed columns and a total of 32 columns in this grid and maybe it's a little bit too big for IE, but i really don't know...
[code] "aoColumns":new aoColumns()[/code]
but nothing new in IE8...
i've managed to find where it's running down :
[code]this.s={
dt:a.fnSettings(),
iTableColumns:a.fnSettings().aoColumns.length,
etc...
[/code]
it's on the first line of the minified version of FixedColumns.
I still need help on this, please
Link to a test case please.
Allan