this appears to bind, but rows in Details Grid are empty. Something is off/missing?
I’ve also tried {Binding SubCustomers}
SubCustomers is a List on parent object.
I am able to bind this way to single Fields such as FirstName etc.. just not the subcollection..
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<DataGrid AutoGenerateColumns="True" ItemsSource="{Binding Source=SubCustomers}" />
</DataTemplate>
</DataGrid.RowDetailsTemplate>
The problem is that you are trying to bind to a property on the
DataContextof the parent, not on that particular row. So, theDataContextof theRowDetailsis the row item, and in order to get the parent’s property, you need to useRelativeSourcebindings. If you bind to theDataContextof the parent, you can then “dot-down” to the property you actually care about: