Error when using fnAdjustColumnSizing in fnDrawCallback

Error when using fnAdjustColumnSizing in fnDrawCallback

jengleyjengley Posts: 1Questions: 0Answers: 0
edited May 2013 in General
I get a "stack overflow error at line 16" when I use fnAdjustColumnSizing in fnDrawCallback. I don't get the error when I use fnAdjustColumnSizing in fnInitComplete, but it doesn't adjust the thead to match the tbody when I run it at init only.

function setRelationships(partData)
{
var rows = new Array();
for(i in partData.relationships)
{
var row = new Array(
partData.relationships[i].cat_num,
partData.relationships[i].description,
partData.relationships[i].equip_type,
partData.relationships[i].relationship_type
);

rows.push(row);
}

$('#tbl_relationships').dataTable({
"aaData": rows,
"bAutoWidth": true,
"bDestroy": true,
"aLengthMenu": [[10, 20, 50, 100], [10, 20, 50, 100]],
"aaSorting": [[ 1, "asc" ]],
"iDisplayLength": 20,
"sScrollY": "270px",
"bScrollCollapse": true,
"fnDrawCallback": function(){
this.fnAdjustColumnSizing();
}
});
}
This discussion has been closed.