Location of fnAdjustColumnSizing call
Location of fnAdjustColumnSizing call
Hi All(an),
I'm using ColReorderWithResize.js and ScrollY.
I'm trying to determine where to place it so the columns are lined up on page load.
The function call works when I call it from:
- Window resize
- a button
The function call doesn't work when I call it from:
- fnInitComplete
- fnDrawCallback (I send a fnAdjustColumnSizing(false) otherwise we get a infinite loop)
- the tab container .show() method (my table is in a bootstrap 2.3.2 tab)
I'm still plugging away but figured someone might have already dealt with this.
Thanks!
I'm using ColReorderWithResize.js and ScrollY.
I'm trying to determine where to place it so the columns are lined up on page load.
The function call works when I call it from:
- Window resize
- a button
The function call doesn't work when I call it from:
- fnInitComplete
- fnDrawCallback (I send a fnAdjustColumnSizing(false) otherwise we get a infinite loop)
- the tab container .show() method (my table is in a bootstrap 2.3.2 tab)
I'm still plugging away but figured someone might have already dealt with this.
Thanks!
This discussion has been closed.
Replies
[code]
fnInitComplete: function () {
this.fnAdjustColumnSizing();
}
[/code]
Are you able to link me to the page you are working on so I can take a look and see what is going wrong?
Thanks,
Allan
The tab.show() and shown() are only called when the tab is clicked, and not when the tab is selected as the active tab for page load.
I've added bRetrieve and have moved my table initialization to document.ready to try and remedy this - to no avail.
What tab implementation are you using? If jQuery UI 1.10, you might try the following:
[code]
$("#tabs").tabs( {
"activate": function(event, ui) {
$.each( $.fn.dataTable.fnTables( true ), function () {
$(this).dataTable().fnAdjustColumnSizing();
} );
}
} );
[/code]
Regards,
Allan