Edit this page

External Row Details

In order to display Row Details outside of the RadGridView, place a DetailsPresenter control somewhere around your RadGridView. The only thing that you need to do in order to synchronize the DetailsPresenter with the RadGridView is to connect its DetailsProvider property to the RowDetailsProvider property of the RadGridView.

The DetailsPresenter control used for displaying external details is exactly the same control internally used by the RadGridView rows.

The RowDetailsProvider takes care to passing the needed data (the data template, the row details style and etc) to the presenter. It doesn't matter if it is internal or external. Each time a different row is selected or the template is changed, the grid will communicate this change via its RowDetailsProvider property and update the connected DetailsPresenter automatically.

Also, you may want to set the RowDetailsVisibilityMode property of the grid view to Collapsed in order to prevent the row details to show both inside and outside the RadGridView.

XAML

<telerik:RadGridView x:Name="radGridView"
                 RowDetailsVisibilityMode="Collapsed">
    <telerik:RadGridView.RowDetailsTemplate>
        <DataTemplate x:Name="RowDetailsProvider">
            <StackPanel Orientation="Horizontal"
                Margin="10,10,10,10">
                <TextBlock Text="City: " />
                <TextBlock Text="{Binding City}" />
            </StackPanel>
        </DataTemplate>
    </telerik:RadGridView.RowDetailsTemplate>
    <!--...-->
</telerik:RadGridView>
<telerik:DetailsPresenter x:Name="ExternalPresenter"
                                  DetailsProvider="{Binding RowDetailsProvider, ElementName=radGridView}" />

C#

this.ExternalPresenter.DetailsProvider = this.radGridView.RowDetailsProvider;

VB.NET

Me.ExternalPresenter.DetailsProvider = Me.radGridView.RowDetailsProvider

You can see that the RowDetailsTemplate must be defined in the RadGridView as it is passed by the RowDetailsProvider to both the internal and the external presenter. The same applies for the RowDetailsStyle.

See Also