FixedHeader column widths
FixedHeader column widths
peterkronenberg
Posts: 112Questions: 0Answers: 0
Allan,
Got a bug for you, but also have a fix. I have a column with no header, so I'm just using  . But FixedHeader was not calculating the width properly. Even though it copies the widths directly into the style based on the column widths of the actual table. The problem is that I think these widths are ignored when table-layout is Auto, which is the default. Since the FixedHeader doesn't have any actual data, it doesn't know what the column width should be.
The solution is to set the table-layout to Fixed, since you're already setting the widths.
I added a line in _fnCloneTable, as follows:
[code]
/* Just a shallow clone will do - we only want the table node */
nCTable = s.nTable.cloneNode( false );
nCTable.removeAttribute( 'id' );
nCTable.style.tableLayout = 'fixed'; <== added this line
[/code]
Now if you can just fixed my other problem with column width as well as the update to ColVis to handle multiple header rows, I'll be all set :-)
Got a bug for you, but also have a fix. I have a column with no header, so I'm just using  . But FixedHeader was not calculating the width properly. Even though it copies the widths directly into the style based on the column widths of the actual table. The problem is that I think these widths are ignored when table-layout is Auto, which is the default. Since the FixedHeader doesn't have any actual data, it doesn't know what the column width should be.
The solution is to set the table-layout to Fixed, since you're already setting the widths.
I added a line in _fnCloneTable, as follows:
[code]
/* Just a shallow clone will do - we only want the table node */
nCTable = s.nTable.cloneNode( false );
nCTable.removeAttribute( 'id' );
nCTable.style.tableLayout = 'fixed'; <== added this line
[/code]
Now if you can just fixed my other problem with column width as well as the update to ColVis to handle multiple header rows, I'll be all set :-)
This discussion has been closed.
Replies
Thanks,
Allan