FixedHeader with multiple rows / colspan

FixedHeader with multiple rows / colspan

ds00424ds00424 Posts: 10Questions: 4Answers: 0

Hi there.
First, let me say what a wonderful tool DataTables is. You've done a great job on the complete package - code, docs, support, etc.

The issue I've come across was reported and briefly discussed in 2018 on this forum: https://datatables.net/forums/discussion/comment/133816

Summary: FixedHeader enabled, two header rows with the first row colspan-ed across all columns in the second row/table. When scrolling and the fixedheader "kicks in", the second row column headers all seem to take on equal widths - even though the cells have an embedded style with specific widths which do not seem to be honored. This happens in multiple browsers.

You provided a workaround to add a third TH row as the first row with unique cells for each column. While that row is visible, things work as expected. If I hide that row using "display:none" the bad behavior returns. (Even manually adding "Display: none" in the DevTools instantly brings back the bad behavior). I also tried "height:0px" which doesn't seem to do anything - the row is still shown. I've added each/both to the TR and/or the THs.

I was wondering if there was any further insight.

I created a test case at https://live.datatables.net/teyaqinu/1/, although the link from 2018 post is still active. In my test case, to get the table to scroll, you may want to set the table to "Show 50 entries"

Thanks for any help on this.

-- David

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    Hi David,

    I'm sorry to say there is no support for multi-row FixedHeaders at the moment. It is something that I plan to address with the updates for DataTables 2, but I don't yet have a timeline for that. Sorry.

    Allan

  • ds00424ds00424 Posts: 10Questions: 4Answers: 0

    AOK. Thank you for clarifying.
    I'll figure something out.

Sign In or Register to comment.