Xceed DataGrid for WPF v7.3 Documentation
Welcome to Xceed DataGrid, Editors, and 3D Views for WPF v7.3 / Xceed DataGrid for WPF / Code Snippets / Indenting a Non-row Item in a Detail Configuration Header
In This Topic
    Indenting a Non-row Item in a Detail Configuration Header
    In This Topic

    The following example demonstrates how to add a non-row item that will act as a detail separator to the header section of a detail configuration whose indentation will correspond to detail and group levels in which it is contained.

    XAML
    Copy Code
    <Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
          xmlns:local="clr-namespace:Xceed.Wpf.Documentation">
      <Grid.Resources>
       <xcdg:DataGridCollectionViewSource x:Key="cvs_employees"
                                          Source="{Binding Source={x:Static Application.Current},
                                                    Path=Employees}"/>
     
      </Grid.Resources>
     
      <xcdg:DataGridControl x:Name="EmployeesGrid"
                            ItemsSource="{Binding Source={StaticResource cvs_employees}}"
                            AutoCreateDetailConfigurations="True">  
         <xcdg:DataGridControl.Columns>
            <xcdg:Column FieldName="Photo"
                         Visible="False" />
         </xcdg:DataGridControl.Columns>
         <xcdg:DataGridControl.DetailConfigurations>
            <xcdg:DetailConfiguration RelationName="Employee_Orders"
                                      Title="Employee Orders"
                                      UseDefaultHeadersFooters="False">
               <xcdg:DetailConfiguration.Headers>
                  <DataTemplate>
                     <DockPanel>                                   
                        <xcdg:HierarchicalGroupLevelIndicatorPane  xcdg:GroupLevelIndicatorPane.ShowIndicators="False"
                                                                   xcdg:TableView.CanScrollHorizontally="False"
                                                                    DockPanel.Dock="Left" />
                        <Border Height="24"
                                xcdg:TableView.CanScrollHorizontally="False"
                                Background="AliceBlue"/>
                     </DockPanel>
                  </DataTemplate> 
                 <DataTemplate>
                     <xcdg:ColumnManagerRow />
                  </DataTemplate>
               </xcdg:DetailConfiguration.Headers>
            </xcdg:DetailConfiguration>
         </xcdg:DataGridControl.DetailConfigurations>       
      </xcdg:DataGridControl>
    </Grid>