Collapsing columns with colspans behaves oddly

I have a grid with 2 headers. The first row has the general categories and the saecond row has specific fields in each category. I want to be able to collapse and expand each general category to show all the fields when expanded and just the totals when collapsed.

I have tried with this

strTopHeader = “{#collapse}2:R Total,#cspan,{#collapse}2:Q Total,#cspan,{#collapse}2:M Total,#cspan,{#collapse}2:A total,#cspan”;
strHeaders = “Rtot,Rdat,Qtot,Qdat,Mtot,Mdat,Atot,Adat”;


this works, but when I collapse the first general catogory (R total) it collapses as it should (there’s only one sub field displayed and it’s the Rtot field) but the second General Category column is in the same place as it was before collapsing the column and theres a blank column in the first header with the sub headers in teh second row being where they should be.

everything works as expected if i take out the #cspan rows and use blank placeholder columns. the documentation on golumn grouping makes it appear as though you can use column spanning with grouping here … grouping&s[]=collapseColumns

but there is no source provided for this so I can’t see what I’m doing wrong? do i just have to go with the blank placeholders and have it not look as good?


This is known limitation. There is no way to use colspan and collapsed columns togethere

Ahh, well, thanks Olga. I guess I’ll have to go about it another way

I did find that I can use colspans as long as I’m not spanning to the column that will still display when the other columns are collapsed, so that will have to do. Thanks for the reply