Column headers not aligned?
Column headers not aligned?
marcsu343a
Posts: 4Questions: 0Answers: 0
So I've looked around for documentation about my problem and have found things that closely related but I am unable to get their solutions to work. This is a link to a picture showing the problem. http://imgur.com/QuSs0 What's happening is that the column headers that you would click to sort are not in aligned with the columns themselves.
debug code: ukukam
debug code: ukukam
This discussion has been closed.
Replies
Allan
[code] function adjust(){
oTable2.fnAdjustColumnSizing();}[code]
Upon pressing the button it does not fix the issue. But if i click one of the column headers they automatically fix themselves. I'm unable to give you a link due to IP blocking for login. Data comes from a database so creating it using the live.datatable site would be hard as well.
Allan
Allan
It sounds to me like the problem is the table being hidden (display:none) when initialised: see for example http://datatables.net/release-datatables/examples/api/tabs_and_scrolling.html .
If it is not that for you, then please post a link - http://datatables.net/forums/discussion/9719/how-to-ask-for-help .
@marcsu343a : Thanks of rate PM. I've just replied there.
Allan
I will check out that example. They aren't exactly hidden but since the cognos render waits to paint the whole page at once, they probably are behaving as if they are hidden.
Allan
[code]
$(window).load( function () {
$('#myTable').dataTable().fnAdjustColumnSizing( false );
} );
[/code]
I think you have inadvertently answered my next question. I could only get small tables with a few columns to
run in IE8 when using Cognos. I think the way it renders the whole page as hidden is the issue.
[code]
$('#tabsdiv').bind('tabsshow',function(event,ui) {
var uitab = ui.tab.hash;
var uitbl = null;
if('#divA' ==uitab) uitbl = '#tblA';
if('#divB' ==uitab) uitbl = '#tblB';
if('#divC' ==uitab) uitbl = '#tblC';
// There are other tabs in this setup, and uitbl might be null
if(uitbl) $(uitbl).dataTable().fnAdjustColumnSizing( false );
});
[/code]