Add/Remove additional Table Column

Hi everybody,

i need your help implementing my plan.

i´ve added a table to my application which maybe look like this:

Column1 | Column2 | Coloumn3
Bla | Blub | BlaBla
Blub | Bla | BlaBla
Blub | BlaBla | Bla
Blub | BlaBla | Bla
Blub | Bla | BlaBla

As you can see, row 3 and 4 are equal. Now i want to add a button or a checkbox wich combines these 2 rows and adds an additional coloumn “counter”

Column1 | Column2 | Coloumn3 | Counter
Bla | Blub | BlaBla | 1
Blub | Bla | BlaBla | 1
Blub | BlaBla | Bla | 2
Blub | Bla | BlaBla | 1

an if i press this button again, i want to switch to the original table view

you understand?!

whats the best way to solve this pr

Two approaches. One is to use
, which is quite simple and easy to use. Down side is, that you cannot, for example, sort or filter based on the generated columns value. If you need sorting, then you need to add an additional property to your container, where you have the counter’s value.

i think this is the better solution for me.

do you have a small example for me?

Depends on which container you use. If you use IndexedContainer, then just add the property just like you’ve added any other properties. Values you’ll have to populate manually.