Show data in group nodes and enable auto calculations.

Apr 23, 2008 at 3:15 PM
Edited Apr 23, 2008 at 3:20 PM
Hi all,

is it possible to show data also in group nodes and how to achieve, that if I have for example order counter column and orders are grouped by some category, is there a possibility ,that in group node is cummulated quantity of all child nodes?

Here is an example: i want to create a list, where each group node can show data in columns and also cumulate value of columns of type integer and double. Is something like that possible? And when i change the grouping, the cumulated groups will be automatically recalculated.


Category...........................Number of orders
+ All.................................................17
.....+ Books....................................12
............Book 1................................5
............Book 2................................6
............Book 3................................1
.....+ Cars........................................5
............Car 1...................................2
............Car 2...................................2
............Car 3...................................1

Thanks for your answers.

Petr
Coordinator
Sep 24, 2008 at 9:21 PM
Hi ftpftp, I've been saying this quite a bit  answering my posts but sorry for not getting back to you sooner - any longer and I would be ready for retirement :-)

Anyway on to your problem, What you need to do is override the section factory and take control of the GroupSection creation, overriding the default version with your own cumalive version. The GroupSection holds a reference to a GroupIdentifier that inturn contains all child row items. With this information you should be able to calc what you need. There's examples in the test app showing how to override sections with your own....

Cheers
Lee