The desired
RowDetailsTemplate content is available just then the row is expanded.
Till this event (see
LoadingRowDetails) the content is null and Try to find it with
DataGridDetailsPresenter.ContentTemplate leads to an exception:
System.InvalidOperationException
HResult=0x80131509
Message=Operation Is valid only for elements using that template.
Source=PresentationFramework
StackTrace:
at System.Windows.FrameworkTemplate.FindName(String name, FrameworkElement templatedParent)
at ProductionOverviewModule.View.ProductionOrdersGrid.GetRowDetailTemplateGrids() in fileName.cs:line 86
for more about see link
https://stackoverflow.com/questions/5679648/why-would-this-contenttemplate-findname-throw-an-invalidoperationexception-on[
^]