How to Join 3+ level headerCell in Grid

Currently, I try create multiple Header in Grid, which should look like as following:

(Product -1)
(Year -1)

| (Month -1) | (Month-2) | (Month-3) | (Month -1) | (Month-2) | (Month-3) |

I can successully create 2 level Header with HeaderRow.Join method. However, join level3 header row will getting error, which cause by Cell Column Id is null !

Any suggestion on how to create grid like that?
hanks !

Hi,

HeaderRow.Join takes in either a list of HeaderCells or propertyIds. Check that all the inputs are not null, at least.

-Olli

Olli Thanks for your reply ~
Please correct my understanding if anything wrong:
In above example grid header, the “Year-1”, “Year-2” and “Product-1” cell, normally not link to any bean property Id because it is only an join cell, right?

for example my code looks like:
HeaderCell year1= headerRow1.join(“month-1”, “month-2”, “month-3”…)
year1.setText(“Year-1”);

HeaderCell product1 = headerRow0.join(year1, year2, …); ==> Here comes the error!
product1.setText(“Product-1”);

So do you suggest to need to define dummy property id in the data bean?

You could try using the underlying properties you use on the previous level, so product1 would be joining month-1, month-2… month-n

-Olli

After re-use the Property ID, works now!
So, the concept is join the propertyId on which HeaderRow individually.

Olli Thanks lot, thanks for helping ~~

No problem, good to hear you got it working!

-Olli

By the way, is possible to merge Headercell on multiple HeaderRow into one?
For example:

| (Product -1) | |
------------------------------------------------------------------------------------------------| |
| (Year -1) | (Year-2) | Summary |
------------------------------------------------------------------------------------------------| |
| (Month -1) | (Month-2) | (Month-3) | (Month -1) | (Month-2) | (Month-3) | |

the “Summary”, by default only display on one HeaderRow, is possible to merge multiple Headerrow like above sample?

Probably the closest you can get to that would be with styles, there’s no API for merging cells vertically.

-Olli

got it~
thanks lot, Olli~