Xceed DataGrid for WPF v7.3 Documentation
Xceed.Wpf.DataGrid Assembly / Xceed.Wpf.DataGrid Namespace / DataGridDetailDescription Class / GetDetailsForParentItem Method
The parent DataGridCollectionView.
The parent data item whose details are to be retrieved.
Example


GetDetailsForParentItem Method (DataGridDetailDescription)
Retrieves the details for the specified parent data item.
Syntax
'Declaration
 
Protected Friend MustOverride Function GetDetailsForParentItem( _
   ByVal parentCollectionView As DataGridCollectionViewBase, _
   ByVal parentItem As Object _
) As IEnumerable
 
'Usage
 
Dim instance As DataGridDetailDescription
Dim parentCollectionView As DataGridCollectionViewBase
Dim parentItem As Object
Dim value As IEnumerable
 
value = instance.GetDetailsForParentItem(parentCollectionView, parentItem)

Parameters

parentCollectionView
The parent DataGridCollectionView.
parentItem
The parent data item whose details are to be retrieved.

Return Value

An IEnumerable representing the details of the specified data item.
Example
All examples in this topic assume that the grid is bound to the Employees table of a LINQ  data context, unless stated otherwise.
The following example demonstrates how to create and use a custom detail description that handles LINQ detail relations, which are provided by properties to which the AssociationAttribute is applied.
<Grid>
  <Grid.Resources>

    <xcdg:DataGridCollectionViewSource x:Key="cvs_employees"
                                       Source="{Binding Source={x:Static Application.Current},
                                                        Path=LinqDataContext.Employees}">
       <xcdg:DataGridCollectionViewSource.DetailDescriptions>
          <local:LinqToSqlDetailDescription RelationName="Employee_Employees"
                                            Title="Employees" />
          <local:LinqToSqlDetailDescription RelationName="Employee_Customer"
                                            Title="Customers">
             <local:LinqToSqlDetailDescription.DetailDescriptions>
                <local:LinqToSqlDetailDescription RelationName="Customer_Order"
                                                  Title="Orders">
                   <local:LinqToSqlDetailDescription.DetailDescriptions>
                      <local:LinqToSqlDetailDescription RelationName="Order_Order_Detail"
                                                        Title="Order Details" />
                   </local:LinqToSqlDetailDescription.DetailDescriptions>
                </local:LinqToSqlDetailDescription>
             </local:LinqToSqlDetailDescription.DetailDescriptions>
          </local:LinqToSqlDetailDescription>
       </xcdg:DataGridCollectionViewSource.DetailDescriptions>
    </xcdg:DataGridCollectionViewSource>
  </Grid.Resources>
 
  <xcdg:DataGridControl x:Name="EmployeesGrid"
                      ItemsSource="{Binding Source={StaticResource cvs_employees}}"
                      ItemsSourceName="Employee Information"
                      AutoCreateDetailConfigurations="True" />
</Grid>
Requirements

Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also