Dear support forum,
I have created in xaml a DataGridCollectionViewSource which works fine.
Now I have added DataGridGroupDescription for a column (but the same happens if I just group the column with the mouse) but I have a problem:
the items insde the cell are not strings or numbers, they are instance of a particular custom class, so each group has only one element (I am guessing this is the problem).
Is there any way I can specify how to decide if an item is in a group or not?
My custom class has unfortunatelly no "Equals" method, if can be usefull in any way my custom class has a To String method and a FieldValue property, if 2 items are the same (group) both To String and FieldValue will return the same thing.
It will be very good if this could be done witout changing my custom class as I am writing a dll for a released application and I cannot alter that class.
I really hope there is a way to do this!
Thanks!
<
xcdg:DataGridCollectionViewSource x:Key="ReportDataDGCVSReference" Source="{Binding ReportData}">
<xcdg:DataGridCollectionViewSource.StatFunctions>
<vm:XceedStatDecimalFieldSum ResultPropertyName="MarketValueSum"
SourcePropertyName="Market Value" />
</xcdg:DataGridCollectionViewSource.StatFunctions>
<xcdg:DataGridCollectionViewSource.GroupDescriptions>
<xcdg:DataGridGroupDescription PropertyName="Position Type" />
</xcdg:DataGridCollectionViewSource.GroupDescriptions>
</xcdg:DataGridCollectionViewSource>