Skip to main content

Retrieving Child Contexts

The following example demonstrates how to retrieve the child contexts of the master data items and collapse any expanded details using the CollapseDetail method.

  <Grid>
<Grid.Resources>
<xcdg:DataGridCollectionViewSource x:Key="cvs_employees"
Source="{Binding Source={x:Static Application.Current},
Path=Employees}"/>

</Grid.Resources>

<DockPanel>
<Button Content="Collapse All Details"
Click="Button_Click"
DockPanel.Dock="Top"/>
<xcdg:DataGridControl x:Name="EmployeesGrid"
ItemsSource="{Binding Source={StaticResource cvs_employees}}"
ItemsSourceName="Order Information"
AutoCreateDetailConfigurations="True"/>
</DockPanel>
</Grid>