1.7 Beta 2 Bug

1.7 Beta 2 Bug

joseph177joseph177 Posts: 4Questions: 0Answers: 0
edited June 2010 in Bug reports
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:
nSizedThs[i] is undefined
[Break on this error] nSizedThs[i].style.width = $(nSizingThs[i]).width()+"px";
jquery.dataTables.js (line 3396)

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:
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>>'

Let me know if you require more information,



  • joseph177joseph177 Posts: 4Questions: 0Answers: 0
    edited June 2010
    FYI I changed the code to this and it appears to work. Not sure if you meant to define nSizedThs & nSizingThs (or just nSizingThs).

    nSizingThs = nScrollFootTable.getElementsByTagName('th');
    for ( i=0, iLen=nSizingThs.length ; i
  • allanallan Posts: 60,962Questions: 1Answers: 9,940 Site admin
    Hi joseph177,

    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...

  • joseph177joseph177 Posts: 4Questions: 0Answers: 0
    edited June 2010
    The funny thing is I'm not generating a ... Not using any funky colspans or rowspans...


  • joseph177joseph177 Posts: 4Questions: 0Answers: 0
    edited June 2010
    Hi Allan, I have also discovered on more small issue (which could be related).

    When there is only one column being generated, I get an error:

    oColumn is undefined
    for ( j=0, jLen=oColumn.asSorting.length ; j
  • markstahlermarkstahler Posts: 15Questions: 0Answers: 0
    "bStateSave": true,

    Changing this to false fixed this problem for me.
This discussion has been closed.