Many thanks for the working code. Building from that, it still took some time to track down the problem, but I finally managed to produce a small example illustrating the problem.
Basically you in the details grid have access to the parent grid's variables. However, as those coincided in the original example it was very hard to see the problem.
Edit: After thinking a bit more about this, it is probably very helpful to have access to the parent row's values as well, such as:
...ClientTemplate("#=tParentRow.Category# -> #=Name#");