Skip to main content

Custom Content in Details

The GridControl allows you to display custom content in details. This topic describes how to use custom templates to display detail data.

Enable the Master-Detail Representation

WPF Grid Master-Detail Custom Content

You can use the ContentDetailDescriptor detail descriptor to display custom content in details. Follow the steps below to enable custom details:

  1. Ensure that the master GridControl‘s TableView.AllowMasterDetail property is set to true (default value).
  2. Assign the ContentDetailDescriptor detail descriptor to the GridControl.DetailDescriptor property.
  3. Configure the detail descriptor:

    1. Create a data template that renders GridControl details. Note that the detail descriptor’s data context is the master row’s bound object.
    2. Assign the content template to the DetailDescriptorBase.ContentTemplate property.

The code sample below uses the ChartControl to visualize detail data:

        <DataTemplate x:Key="ordersChartTemplate">
            <dxc:ChartControl DataSource="{Binding Orders}">
                    <dxc:Title Content="{Binding CompanyName}"/>
                    <dxc:LineSeries2D DisplayName="Freight" 

    <dxg:GridControl ItemsSource="{Binding Customers}">
            <dxg:ContentDetailDescriptor ContentTemplate="{StaticResource ordersChartTemplate}"/>
        <!-- columns -->

Display Custom Content in Row Details

You can also display custom content in the focused row details. To do this, create a template that renders custom content and assign it to the TableView.RowDetailsTemplate property.

WPF Grid Row Details Custom Content