WPF How to create groups in DataGrid - C#

Aug 18, 2009 at 1:44 PM


I have to use a DataGrid in my project and been looking at the component last few days, Managed to put my custom data in it now what i need is styling (found lots of material online about it) and i need a way of spliting my data in groups. I could find many examples in XAML of how to do it but none have demonstrated it in C# code-behind. I gave it a few attempts but always hit a wall... Could someone please help me understand how i make groups in code-behind when my DataGrid.ItemsSource is a List of Objects?