We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

column header span multiple columns

Resolved
Accobat Development asked on November 2, 2022

Hello,
 
Is it possible to get the column header to span multiple columns if you have nested columns?
So that the top column header in the picture span 0,15,30,45.
 
/Jimmy
 

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 3, 2022

Hello, Jimmy!
 
Thank you for contacting us.
 
Kindly note that the merging cells feature is not available out of the box.
However we can suggest a possible workaround by changing some CSS styles to make the text of the expanded cell overlap the next empty cells.
 
The idea lies in the following:
 
1. To avoid the ... instead of a cell value, change the `overflow:hidden` property to visible.

#fm-pivot-view .fm-header-c[data-r="1"] {
  overflow: visible !important;
}

 
2. Raise the stack order of the text by changing its z-index:

#fm-pivot-view .fm-header-c.fm-expanded[data-r="1"] {
  z-index: 1 !important;
}

 
3. You can also play with the borders to merge header cells visually:

#fm-pivot-view .fm-header-c[data-r="1"] {
  border-right: none !important;
}

#fm-pivot-view .fm-expanded[data-r="1"],
#fm-pivot-view .fm-collapsed[data-r="1"] {
  border-left: 1px solid #E9E9E9 !important;
}

 
We have prepared a JSFiddle sample for illustration: https://jsfiddle.net/flexmonster/cwyLeb7r/
Please note that this example illustrates the general approach. You can modify it further according to your needs.
 
Hope you will find our answer helpful.
Feel free to contact us in case of any other questions.
 
Regards,
Solomiia

Public
Accobat Development November 4, 2022

Hello Solomiia,
Thanks for the solution.
/Jimmy

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 4, 2022

Hello, Jimmy!

Thank you for your swift response.

Could you please confirm that the suggested approach works well for your case?

Your feedback is valuable to our team, so we are looking forward to hearing from you.

Regards,
Solomiia

Public
Accobat Development November 7, 2022

Hello Solomiia,
 
I found that this works better for what I'm doing:

#fm-pivot-view .fm-header-c.fm-expanded,

#fm-pivot-view .fm-header-c.fm-collapsed,

#fm-pivot-view .fm-header-c.fm-empty {

        overflow: visible !important;
        border-right: none !important;
}

#fm-pivot-view .fm-header-c.fm-expanded {

        z-index: 1 !important;
}

#fm-pivot-view .fm-header-c.fm-v-sort,

#fm-pivot-view .fm-cell.fm-empty:not(.fm-header) {

        border-left: 1px solid #E9E9E9 !important;
}
 

/Jimmy

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster November 7, 2022

Hello, Jimmy!

Thank you for your feedback.

We are glad to hear that our example was helpful in coming up with a solution for your use case.

Feel free to contact us if any other questions arise.

Regards,
Solomiia

Please login or Register to Submit Answer