Display parent / child rows - RowDetailsTemplate

Nov 18, 2015 at 9:57 AM
Hi,

I need to be able to display parent / child rows when I use in RowDetailsTemplate ExtendedDataGrid.
When I use in RowDetailsTemplate ExtendedDataGrid, I can't see any child data column.
However, when I use standard Datagrid, I can see all columns properly.

Please can you give me an advise, whats the wrong?

Here is my code:

<Window x:Class="grdext.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ExtendedGridControl="clr-namespace:ExtendedGrid.ExtendedGridControl;assembly=ExtendedGrid"
    xmlns:ExtendedColumn="clr-namespace:ExtendedGrid.ExtendedColumn;assembly=ExtendedGrid"
    xmlns:ExtendedControls="clr-namespace:ExtendedGrid.Microsoft.Windows.Controls;assembly=ExtendedGrid"
    Title="MainWindow" Height="350" Width="525">
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="500"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <ExtendedGridControl:ExtendedDataGrid Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                          x:Name="grdPaginyPrirazene" ItemsSource="{Binding Uloha1.Tazatele}"
                                          AutoGenerateColumns="False" HideColumnChooser="False" ShowSortOrder="True"
                                          GroupByControlVisibility="Collapsed"
                                          IsReadOnly="True"
                                             >
        <ExtendedControls:DataGrid.Columns>
            <ExtendedColumn:ExtendedDataGridTextColumn Header="ID" AllowAutoFilter="True"
                                       Binding="{Binding IDTazatel}" />
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Jméno" AllowAutoFilter="True"
                                       Binding="{Binding Jmeno}" />
            <ExtendedColumn:ExtendedDataGridTextColumn Header="Příjmení"
                                       Binding="{Binding Prijmeni}" AllowAutoFilter="True"/>
        </ExtendedControls:DataGrid.Columns>
        <ExtendedGridControl:ExtendedDataGrid.RowDetailsTemplate>
            <DataTemplate>
                <!--<DataGrid  Margin="10" AutoGenerateColumns="False" x:Name="dgInner" ItemsSource="{Binding Byty}">
                    <DataGrid.Columns>
                        <DataGridTextColumn Header="ID tazatel" Width="100" Binding="{Binding IDTazatel}"/>
                        <DataGridTextColumn Header="Město" Width="100" Binding="{Binding Mesto}"/>
                        <DataGridTextColumn Header="Ulice" Width="100" Binding="{Binding Ulice}"/>
                    </DataGrid.Columns>
                </DataGrid>-->
                <ExtendedGridControl:ExtendedDataGrid  Margin="10" AutoGenerateColumns="False" x:Name="grdPaginyPrirazeneT" ItemsSource="{Binding Byty}"
                                                                HideColumnChooser="False" ShowSortOrder="True"
                                          GroupByControlVisibility="Collapsed"
                                          IsReadOnly="True">
                    <ExtendedControls:DataGrid.Columns>
                        <ExtendedColumn:ExtendedDataGridTextColumn Header="ID tazatel" Width="100" Binding="{Binding IDTazatel}"/>
                        <ExtendedColumn:ExtendedDataGridTextColumn Header="Město" Width="100" Binding="{Binding Mesto}"/>
                        <ExtendedColumn:ExtendedDataGridTextColumn Header="Ulice" Width="100" Binding="{Binding Ulice}"/>
                    </ExtendedControls:DataGrid.Columns>
                </ExtendedGridControl:ExtendedDataGrid>
            </DataTemplate>


        </ExtendedGridControl:ExtendedDataGrid.RowDetailsTemplate>
    </ExtendedGridControl:ExtendedDataGrid>
</Grid>
</Window>


Thanks,
Jan