Datagrid grouping by multiple columns

Is there any ability to group rows by multiple columns? I want to group rows that have the same value in four separate columns.

This demo might help you: DataGrid conditional template

I'm thinking that won't work for my use case. In that example it seems that grouping begins with the leftmost column. I'm needing something that is essentially the exact same as the grouping functionality, but grouping on more than just the one column.

The example will work for any column position.

For instance, instead of just grouping all rows that have column A in common, I need to group all rows that have column A and B in common.