In XAML, if I create one datagrid, I can assign a name to it and call it within the program. If I create another datagrid after the first one and assign a name such as below, it won't be recognized on the C# side. What do I have to do to make it be recognized in the C# side?
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<DataGrid x:Name="secondDataGrid">
</DataGrid>
</DataTemplate>
</DataGrid.RowDetailsTemplate>