I have an ArrayCollection
we'll call "Items". It is essentially a flat collection of hierarchical data (each item has Parent
and Children
properties). I want an AdvancedDataGrid
to display the data in hierarchical form, so essentially I could just do this and it would display fine:
// Note: RootItems would be an ArrayCollection that is updated so only the
// top level items are within (item.Parent == null).
var hd:HierarchicalData = new HierarchicalData(model.RootItems);
var hcv:HierarchicalCollectionView = new HierarchicalCollectionView(hd);
myDataGrid.dataProvider = hdc;
This works, but I want to be able to see updates in myDataGrid
when the Items
collection is updated (since RootItems
won't pick up updates to any children, only the top level tasks). Is there any easy way to do this? I'm guessing I'll have to create a class that extends HierarchicalData
and somehow alert it when Items
changes, but that sounds like it'll be pretty slow. Thanks in advance for any help you can provide!