Thank you very much for your help. That helped a lot, and I'm making a lot of progress.
Clicking on a data row checkbox will now correctly update the associated groupby checkbox, and vice versa.
I only have 1 situation that doesn't work yet:
When I initially open the screen and click on the groupby row to expand it, then I need to initialize the groupby header checkbox (checked/unchecked/indeterminate) based on the current state of all the associated data row checkboxes. What would be the correct place to do this? I've been looking at the InitializeRow, BeforeRowExpanded and AfterRowExpanded events, but I don't see how I can change the value of the groupby row's checkbox from there.