Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Hierarchical DataGrid where detail or child levels are at the same level

$
0
0

Hi Support.

I am evaluating your DataGrid and would like to know how define the XAML to allow multiple detail or child grids at the same level.

I am using datatables for a master-detail scenario where one master row may have up to 5 detail levels AT THE SAME LEVEL. I.e. Master table, DetailTableA,
DetailTableB, DetailTableC, DetailTableD and DetailTableE. A one to many relationship exist between Master and each Detail.

The xaml below is incorrect but it conveys what I’m trying to do.

            <c1:C1DataGrid.RowDetailsTemplate>
                <DataTemplate>
                    <c1:C1DataGrid x:Name="gridDetailA" 
                                   Style="{StaticResource GridDetailA}"
                                   Margin="10"
                                   CanUserAddRows="False"
                                   IsReadOnly="True"
                                   AutoGenerateColumns="False"
                                   SelectedIndex="-1">
                        <c1:C1DataGrid.Columns>
                            <c1:DataGridTextColumn Binding="{Binding ID}" CanUserSort="False"/>
                            <c1:DataGridTextColumn Binding="{Binding ColA}" CanUserSort="False"/>
                        </c1:C1DataGrid.Columns>
                    </c1:C1DataGrid>
                    <c1:C1DataGrid x:Name="gridDetailB" 
                                   Style="{StaticResource GridDetailB}"
                                   Margin="10"
                                   CanUserAddRows="False"
                                   IsReadOnly="True"
                                   AutoGenerateColumns="False"
                                   SelectedIndex="-1">
                        <c1:C1DataGrid.Columns>
                            <c1:DataGridTextColumn Binding="{Binding ID}" CanUserSort="False"/>
                            <c1:DataGridTextColumn Binding="{Binding ColB}" CanUserSort="False"/>
                        </c1:C1DataGrid.Columns>
                    </c1:C1DataGrid>
                </DataTemplate>
            </c1:C1DataGrid.RowDetailsTemplate>

Regards
Kobus


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>