HI,
I was wondering if it was possible to use a combination of properties in GroupDescriptor.
For example:
I have the data set:
I would like to group by Name and Test and show the sum of the two parts (ordered by Name, then Test).
I recently had this working by adding a property to DummyModel that had both a Name and Test Properties and implemented IComparable and overwrote Equals and GetHashCode which allowed the grouping and sorting as I desired.I used this property as the Member property of the GroupDescriptor.
However this stopped working when we upgraded to v4.0.30319.
Any help on this issue would be greatly appreciated.
Thanks,
Steven
I was wondering if it was possible to use a combination of properties in GroupDescriptor.
For example:
I have the data set:
new DummyModel { Name = "Bob", Test = "A", Part = "i", Score = 12},new DummyModel { Name = "Bob", Test = "A", Part = "ii", Score = 11},new DummyModel { Name = "Bob", Test = "B", Part = "i", Score = 15},new DummyModel { Name = "Bob", Test = "B", Part = "ii", Score = 16},new DummyModel { Name = "Sue", Test = "A", Part = "i", Score = 6},new DummyModel { Name = "Sue", Test = "A", Part = "ii", Score = 14},new DummyModel { Name = "Sue", Test = "B", Part = "i", Score = 22},new DummyModel { Name = "Sue", Test = "B", Part = "ii", Score = 18},I would like to group by Name and Test and show the sum of the two parts (ordered by Name, then Test).
I recently had this working by adding a property to DummyModel that had both a Name and Test Properties and implemented IComparable and overwrote Equals and GetHashCode which allowed the grouping and sorting as I desired.I used this property as the Member property of the GroupDescriptor.
However this stopped working when we upgraded to v4.0.30319.
Any help on this issue would be greatly appreciated.
Thanks,
Steven