BUG: FixedColumns breaks when using a remote language file (oLanguage.sUrl) in the datatables
BUG: FixedColumns breaks when using a remote language file (oLanguage.sUrl) in the datatables
So I know that the language file loads properly on all other tables without issue. The problem is when it is enabled on a table which also is using FixedColumns. I am using FixedColumns vs. 2.0.1 with DataTables 1.8.1
I get the following error in Chrome: "Uncaught TypeError: Cannot read property 'parentNode' of undefined". The error originates around line 522 of my FixedColumns.js file and the offending line of code is "this.dom.grid.dt.parentNode.insertBefore( nSWrapper, this.dom.grid.dt );" So somehow the property "dt" of "this.dom.grid" has not been set properly.
Here's my code for the table:
[code]
var dtSettings = {};
// ... A ton of other settings that don't matter ... //
dtSettings.oLanguage = {};
dtSettings.oLanguage.sUrl = site_url + 'themes/default/js/language/' + ec.settings.lang + '/datatables_lang.js';
// GO DATATABLES!!
var tableObj = {};
tableObj.full = EC.table.dataTable(dtSettings);
// Go FixedColumns!!!
var fixed_col = 3;
tableObj.oFC = new FixedColumns( tableObj.full, {
"iLeftColumns": fixed_col,
"iLeftWidth": 450, // pixels
"sLeftWidth": 'fixed'
});
[/code]
I get the following error in Chrome: "Uncaught TypeError: Cannot read property 'parentNode' of undefined". The error originates around line 522 of my FixedColumns.js file and the offending line of code is "this.dom.grid.dt.parentNode.insertBefore( nSWrapper, this.dom.grid.dt );" So somehow the property "dt" of "this.dom.grid" has not been set properly.
Here's my code for the table:
[code]
var dtSettings = {};
// ... A ton of other settings that don't matter ... //
dtSettings.oLanguage = {};
dtSettings.oLanguage.sUrl = site_url + 'themes/default/js/language/' + ec.settings.lang + '/datatables_lang.js';
// GO DATATABLES!!
var tableObj = {};
tableObj.full = EC.table.dataTable(dtSettings);
// Go FixedColumns!!!
var fixed_col = 3;
tableObj.oFC = new FixedColumns( tableObj.full, {
"iLeftColumns": fixed_col,
"iLeftWidth": 450, // pixels
"sLeftWidth": 'fixed'
});
[/code]
This discussion has been closed.
Replies
Allan