There is a collection (ObservableCollection) A, each object of collection A has a collection B (ObservableCollection). You need to do a Binding for the DataGrid ItemsSource of all B collections, each of which is in an A collection item and you need to remove all items from B that were in A when deleting an item from the A collection. nothing is removed from the datagrid. Also it would be desirable that when adding an element A, DataGrid added all AB

this.B = new ObservableCollection<B>(); this.A.ToList().ForEach(a => aBToList().ForEach(b => this.B.Add(b))); <DataGrid ItemsSource="{Binding B}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Width="*" IsReadOnly="True" Header="Data" Binding="{Binding Data}"/> </DataGrid.Columns> </DataGrid> 
  • Lay out the code that was done, it needs only a little refinement and everything will work - Gardes
  • one
    Expose in VM the calculated property IEnumerable<B> Bs => As.SelectMany(a => a.Bs); and get attached to it. The main NotifyPropertyChanged(nameof(Bs)) is to add / remove elements in As call NotifyPropertyChanged(nameof(Bs)) , so that View reread this property - Andrey NOP
  • @AndreyNOP NotifyPropertyChanged does not update DataGrid - Mike Waters
  • one
    Updates, if you do as I wrote - Andrew NOP
  • @AndreyNOP "calculated property" understood) works) thanks) - Mike Waters

0