FixedHeader column widths

FixedHeader column widths

peterkronenbergpeterkronenberg Posts: 112Questions: 0Answers: 0
edited November 2010 in General
Allan,
Got a bug for you, but also have a fix. I have a column with no header, so I'm just using &nbsp. 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 :-)

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It's an interesting idea to used fixed width columns. I'll certainly have a look at integrating this into future releases and see what other benefits might be gained from using fixed width layout.

    Thanks,
    Allan
This discussion has been closed.