Squished Datatable
Squished Datatable
I have a data-table at http://coc.dniwebdesign.com which shows up perfectly and works the way I need it too. However, when I click a members name (right now it's only on "dnirvine") it opens a lightbox with another datatable. The problem is the datatable in the iframe isn't full width but squished to one side. How would I be able to fix it? I am using Firefox and haven't tried to see if this re-occurs in any other browser. You should be able to see the problem at the page listed above. Thanks. :)
This discussion has been closed.
Replies
Doesn't appear to be doing anything even on `dnirvine` I'm afraid. However, my guess is that the table is hidden when it is initialised. If this is the case, then you need to call fnAdjustColumnSizing when the table is made visible.
Allan
http://coc.dniwebdesign.com/help.png
By "right now it's only on dnirvine" I mean that, that's the only one I have activated to see the profile of the user. I'm sure it would be the same on all users profile pages as it's the same page.
You need to use fnAdjustColumnSizing when the table is made visible. Something like:
[code]
$('#stats').dataTable().fnAdjustColumnSizing()
[/code]
in the iframe'd document would do.
Allan
It needs to be done once the table is visible - otherwise it doesn't have any height / width and the calculations are meaningless. How exactly you do that, i'm not sure - perhaps the fancy box as an API for letting you know or something.
Allan