The command which changes the grouping should be set for each TreeViewItem instead of the whole TreeView. For your convenience we modified the "Grouping and Filtering" example in order to use TreeView instead of ListBox for selecting resources, please check the attached sample project for the exact approach.
I hope this will help you.
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>