When the user groups iGrid by a column, iGrid first removes all existing grouprows and create new group rows according to the current grouping criteria (this is the nature of grouping). Sure, the group row with totals you added manually is removed at that.
To solve the problem, you just need to re-add your special total row in the AfterContentsGrouped event.