I have a DataGrid that is bound to collection and that I want to be grouped. Here is the code
Collection:
private string _ID;
private string _Descri
You could use a converter that's passed the Items property of the group header e.g.
where the converter performs the calculation and passes back the total as the string for the text block:
public class GroupsToTotalConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is ReadOnlyObservableCollection
As for the description I'd suggest also grouping by that, and writing another converter to pull out the description from the Items in a similar manner to above.