Fixed columns problems
Fixed columns problems
I have a table 40 columns wide, which I wanmt to scroll horizental with 2 fixed left columns.
I have working but are having problems with the one of the left column
http://www.sailracer.us/eventsites/test/table.htm
This contains names of varrying lengthes, the text is wrapping in the cell but data in the otehr row cells is not so this means the table does not align and although you see all the data in the scrolling section, the fixed columns looses teh bottom rows.
Any ideas ?
Simon
I have working but are having problems with the one of the left column
http://www.sailracer.us/eventsites/test/table.htm
This contains names of varrying lengthes, the text is wrapping in the cell but data in the otehr row cells is not so this means the table does not align and although you see all the data in the scrolling section, the fixed columns looses teh bottom rows.
Any ideas ?
Simon
This discussion has been closed.
Replies
[code]
.DTFC_LeftBodyWrapper td { overflow: hidden; display: inline }
[/code]
What I'm not sure about is where the inline widths for the TDs come from. Certainly a wider second column would also help with the above; by showing more of the name before it becomes cut off, the cut off names would be a rarity.
But to make all the other cells (the actual data) expand in height automatically is beyond simple HTML; they are technically in different tables and therefore not related to one-another.
If the code that creates the fixed columns doesn't specify a way to set a height attribute, you could do this with some sort of custom JavaScript. In the fnDrawCallback, you could have a script that finds the computed height of those 'label' cells, and then applies the same height to the data cells.
This is reposted from the private message you sent me fir the benefit of anyone else reading the thread. Greg's advice is also good for forcing content to be on all one line if you want (you might or might not want that). td { white-space: nowrap; } is very useful for that and does it in one line :-).
What you want to do is make use of the sHeghtMatch option in FixedColumns and set it to "auto": http://datatables.net/docs/FixedColumns/2.0.0/FixedColumns.defaults.html#sHeightMatch_details .
The reason that this is required in the case you are using, is tha the semi-automatic height matching which is used by default isn't quiet good enough for your table. The reason that it is the default is that it is good enough for the majority of tables, and it's a lot faster than the auto option. However in some cases, such as what you are seeing the more complete algorithm is required.
Regards,
Allan
http://www.sailracer.us/eventsites/test/table1.htm
But getting the table repeating at bottom, also some odd resutls when you search, try entereing red