New to Telerik UI for WPF? Start a free 30-day trial
Find a control in RowDetailsTemplate
Updated on Sep 24, 2025
This article demonstrates how to find a control which is placed in the DataTemplate of the RowDetailsTemplate.
Let assume that you have a control (RadComboBox) in the RowDetailsTemplate which you need to set some properties at runtime:
XAML
<telerik:RadGridView.RowDetailsTemplate>
<DataTemplate>
<StackPanel>
<telerik:RadComboBox Name="rcbCountries" />
<!-- some other controls here -->
</StackPanel>
</DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>
The best way to do this is to subscribe to the LoadingRowDetails event and find the control there:
XAML
<telerik:RadGridView Name="gridView"
ItemsSource="{Binding Source={StaticResource itemsList}}"
LoadingRowDetails="gridView_LoadingRowDetails"
RowDetailsVisibilityMode="VisibleWhenSelected">
In the LoadingRowDetails event handler use the FindName method of the e.DetailsElement:
C#
private void gridView_LoadingRowDetails(object sender, GridViewRowDetailsEventArgs e)
{
RadComboBox countries = e.DetailsElement.FindName("rcbCountries") as RadComboBox;
countries.ItemsSource = GetCountries();
}