Search code examples
c#.netwpfcompositecollection

Work around for lack of Grouping in CompositeCollection


When I try to add a GroupDescriptor to my CompositeCollection I get an exception informing me that the CompositeCollection does not supporting grouping.

I would like to know if anyone has found a good work around for this limitation. I have two collections which I am "zipping" together and trying to group. If it is any help, I am not interested in grouping between the collections, just with in the collections them selves.


Solution

  • Use CollectionViewSource on your CompositeCollection, please take a look at How to handle a CompositeCollection with CollectionView features?.