I have a datagrid say Datagrid1 that is populated with a List (Dynamically through code behind). Inside the row details template for datagrid , i want to add a datagrid, lets calls it datagrid2, the datagrid2 needs to dynamically poupulated with List on the SelectionChange event of Datagrid1 ? Accessing the datagrid2 and binding it to a datasource needs to be done in the code behind. Can somone help me out with this? my xaml is:
<Grid>
<my:DataGrid Name="dataGrid1" ItemsSource="{Binding}">
<my:DataGrid.RowDetailsTemplate>
<DataTemplate>
<my:DataGrid Name="dataGrid2"></my:DataGrid>
</DataTemplate>
</my:DataGrid.RowDetailsTemplate>
</my:DataGrid>
</Grid>