1.7 Beta 2 Bug
1.7 Beta 2 Bug
joseph177
Posts: 4Questions: 0Answers: 0
Good day,
First off, great job with datatables, I think it's an excellent tool. I'm very excited about the 1.7 release as the fixed header is a BIG plus. Like others, I was getting column alingment issues when showing plenty of columns (some nulls, etc). I was using the 1.7 beta without issue, and when I upgraded to 1.7 Beta 2 I started receiving errors:
FireFox 3.5.9 w/ Firebug:
[code]
nSizedThs[i] is undefined
[Break on this error] nSizedThs[i].style.width = $(nSizingThs[i]).width()+"px";
jquery.dataTables.js (line 3396)
[/code]
The datatable loads the first round of data, then this error trips it up (the Processing appears stuck).
Here is how I have defined my datatable:
[code]
function initDataTable_metric_datagrid_1958(){
var metric_datagrid_1958 = $('#metric_datagrid_1958').dataTable({"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "display_catalog_datatable.aspx",
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name": "dtid", "value": "metric_datagrid_1958"});
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"sPaginationType": "full_numbers",
"sScrollY": 100,
"sScrollX": "100%",
"bStateSave": true,
"bJQueryUI": true,
"iDisplayLength": 10,
"aaSorting": [[ 1, "asc"]],
"sDom": '<"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"fl<"float:right;margin-right:0px;"p>>'
});
}
[/code]
Let me know if you require more information,
Cheers
First off, great job with datatables, I think it's an excellent tool. I'm very excited about the 1.7 release as the fixed header is a BIG plus. Like others, I was getting column alingment issues when showing plenty of columns (some nulls, etc). I was using the 1.7 beta without issue, and when I upgraded to 1.7 Beta 2 I started receiving errors:
FireFox 3.5.9 w/ Firebug:
[code]
nSizedThs[i] is undefined
[Break on this error] nSizedThs[i].style.width = $(nSizingThs[i]).width()+"px";
jquery.dataTables.js (line 3396)
[/code]
The datatable loads the first round of data, then this error trips it up (the Processing appears stuck).
Here is how I have defined my datatable:
[code]
function initDataTable_metric_datagrid_1958(){
var metric_datagrid_1958 = $('#metric_datagrid_1958').dataTable({"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "display_catalog_datatable.aspx",
"fnServerData": function ( sSource, aoData, fnCallback ) {
aoData.push( { "name": "dtid", "value": "metric_datagrid_1958"});
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"sPaginationType": "full_numbers",
"sScrollY": 100,
"sScrollX": "100%",
"bStateSave": true,
"bJQueryUI": true,
"iDisplayLength": 10,
"aaSorting": [[ 1, "asc"]],
"sDom": '<"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"fl<"float:right;margin-right:0px;"p>>'
});
}
[/code]
Let me know if you require more information,
Cheers
This discussion has been closed.
Replies
[code]
nSizingThs = nScrollFootTable.getElementsByTagName('th');
for ( i=0, iLen=nSizingThs.length ; i
What should be happening in the code that you changed was to copy the width of each TH cell in the true header ("nSizingThs") to the cells in the foot ("nSizedThs"). As such, I think the code was actually correct as it was, since with your change it simply sets the width to what it already is for each nSizingThs element.
So the obvious question is: what is your markup for the footer? Do you have a colspan / rowspan - as that would probably cause the effect you are seeing... I'd agree that there is a bug here...
Regards,
Allan
[code]
etc...
etc...
[/code]
When there is only one column being generated, I get an error:
oColumn is undefined
for ( j=0, jLen=oColumn.asSorting.length ; j
Changing this to false fixed this problem for me.