Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Invert Column & Row for a Table
Hi !
I'm trying to do a comparison tools using table, the aim is to compare many properties of 2 or 3 different objects.
This can be easily accomplish by a regular Container using ContainerProperty for the object properties & Item for objects but regarding to the high number of properties & low number of Item, I would like to display Item as Column & ContainerProperty as Row.
Does someone know how to do it ?
Thanks in advance.
Oliv
You could hide the tableheader, and style the first cell of a row as a header
Danny Roest: You could hide the tableheader, and style the first cell of a row as a header
I'm afraid it won't be enough, I also need to swap column index & row index but don't know which method override to do the trick.
Here is what we have now using a Container:
|-----------|-------------|-------------|-------------|-------------|-------------|
| | Property 1 | Property 2 | Property 3 | Property 4 | Property 5 |
|-----------|-------------|-------------|-------------|-------------|-------------|
| Object A | 12.0 | 1.2 | true | A | empty |
|-----------|-------------|-------------|-------------|-------------|-------------|
| Object B | 58.3 | 1.0 | true | B | full |
|-----------|-------------|-------------|-------------|-------------|-------------|
Here is what I'me trying to accomplish:
|---------------|-----------|-----------|
| | Object A | Object B |
|---------------|-----------|-----------|
| property 1 | 12.0 | 58.3 |
|---------------|-----------|-----------|
| property 2 | 1.2 | 1.0 |
|---------------|-----------|-----------|
| property 3 | true | true |
|---------------|-----------|-----------|
| property 4 | A | B |
|---------------|-----------|-----------|
| property 5 | empty | full |
|---------------|-----------|-----------|
Hi Oliv, i am trying to do the exact same thing. Have you found any way to do that?