Some implementation can be done with subgrid module where the main columns are the summary (data is all form server) and the subgrid has a detail lines.
I plan to include in the next releases (not in the upcomming) treegrid which will do that very easy
Thanks,
And now, can I provide some special look for some rows – for example, class attribute? I could count summaries on server side and show them in this special row without subgrids?