I'm looking for a way to implement tree level summary rows in NatTable. The tree layer works great for grouping data but I think it would be beneficial if it was able to "roll up" columns in the group to the group heading row. This would allow users to, at a glance, view the contents of the group when it is collapsed and compare them to other groups.
Currently the tree layer looks like this in NatTable:
I haven't heard of such a feature before. So I guess nobody has something similar working with NatTable nor is it a planned feature.
I can't look at the code right now, but I guess technically it should be possible. NatTable shows the data values of the data model in the cells. For the rows that show the tree nodes, there should be some technical model that has no values for the other columns. You would need to tell that model element what it should contain. In your case the sum of the values in the child rows.
As I'm currently not able to have a look in the code to verify my statements, this is just an idea. But maybe it helps you to find a solution.
I noticed that in the group heading row, your cell painters can look at the cell object for the label GROUP_BY_OBJECT, then with the help of the dataValue, you can do the sum yourself and return the proper value in TextToDisplay.