I'm working with the WPF DataGrid and .Net 4.5 and I'm trying to roll my own data virtualization container for a large collection. I've been all over the web and found many helpful examples of how to implement data virtualization, but in every example I've seen, the savings are lost if you do any grouping. My grouping is simple and static. Is there a way to fake grouping in WPF in such a way that my collection doesn't have to enumerate all items ahead of time? For example, has anyone ever overridden the ListCollectionView
's GetItemAt()
and just returned a CollectionViewGroup
object at the start of each group?
Concrete Example:
.
If you are dealing with a flat list and a static grouped list and are worried about performance related to the aggregation, I would consider storing both versions of the data sets in an index and just grab whichever one you need for each particular case.