Multi Line Header in p:datatable

1.7k Views Asked by At

I intend to build, using Primefaces and using the tag p:dataTable, something like this:

Desired Table

So the goal is for the second row headers to be twice as tall as the first row headers.

I have this code:

        <p:dataTable>

        <p:columnGroup type="header">
            <p:row>
                <p:column colspan="1" rowspan="1" headerText="Header 1" />
                <p:column colspan="1" rowspan="1" headerText="Header 2" />
            </p:row>
            <p:row>
                <p:column colspan="1" rowspan="2" headerText="Header 3" />
                <p:column colspan="1" rowspan="2" headerText="Header 4" />
            </p:row>
        </p:columnGroup>

    </p:dataTable>

But what I get is this (the headers are with the same height):

Primefaces Table Can someone help? Thank you.

0

There are 0 best solutions below