Combined grouping table


I would like to have a grouping table that allows the group rows to be clickable and also show when there are no related child items.

The grouping is only one level deep but the objects differ. Currently, I have a grouping on the child objects and then group on their parent.

However, when there are no children, the parents do not appear and there is no option to enter the editor of the parents.

Is there a solution for this? I considered the tree table but that requires the objects to be the same, which they are not.

Thanks for any help.


Unfortunately, GroupTable does not support groups without records, thus you cannot use it for your task. You can implement something like one-level tree with fixed one property grouping using TreeTable, but in this case you have to extract common base entity.

It can be done using two different techniques:

  1. Use Single table inheritance for Group and Row items and extract base persistent entity that will contain all the properties shown in TreeTable. For group row that properties will return simply null values.

  2. Use non-persistent entities for Group and Row and emulate Tree structure using CustomHierarchicalDatasource

If you use way #1 all the standard actions will work with your TreeTable, in case of #2 you will have more flexible solution, but you will have to implement standard Create / Edit / Remove actions manually.