Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6547237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:48:20+00:00 2026-05-25T11:48:20+00:00

So I build a nice nested datagrid that look something like this: <dg:DataGrid x:Name=mainGrid

  • 0

So I build a nice nested datagrid that look something like this:

<dg:DataGrid x:Name="mainGrid"
                AutoGenerateColumns="False" 
                CanUserAddRows="False"
                AreRowDetailsFrozen="True"
                CanUserReorderColumns="False"
                CanUserResizeColumns="True"
                CanUserResizeRows="False"
                SelectionUnit="FullRow"
                RowDetailsVisibilityMode="VisibleWhenSelected">
                <dg:DataGrid.Columns>
                    <dg:DataGridTemplateColumn CanUserResize="False" CanUserSort="False" Width="36" IsReadOnly="False">
                        <dg:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Button Content="+" Width="28" Height="28" />
                            </DataTemplate>
                        </dg:DataGridTemplateColumn.CellTemplate>
                    </dg:DataGridTemplateColumn>
                    <dg:DataGridTemplateColumn>
                        <dg:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Grid>
                                    <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}"/>
                                </Grid>
                            </DataTemplate>
                        </dg:DataGridTemplateColumn.CellTemplate>
                    </dg:DataGridTemplateColumn>
                    <dg:DataGridTemplateColumn Header="Name" IsReadOnly="True" Width="582">
                        <dg:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Margin="5" VerticalAlignment="Center" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=Default}" />
                            </DataTemplate>
                        </dg:DataGridTemplateColumn.CellTemplate>
                    </dg:DataGridTemplateColumn>
                    <dg:DataGridTemplateColumn Header="Status" IsReadOnly="True" Width="150">
                        <dg:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock Margin="5" VerticalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=Default}" />
                            </DataTemplate>
                        </dg:DataGridTemplateColumn.CellTemplate>
                    </dg:DataGridTemplateColumn>
                    <dg:DataGridCheckBoxColumn Binding="{Binding IsSelected}"/>
                </dg:DataGrid.Columns>
                <dg:DataGrid.RowDetailsTemplate>
                    <DataTemplate>
                        <dg:DataGrid x:Name="scondaryDatagrid" Margin="29,0,0,0" 
                            AutoGenerateColumns="False" 
                            CanUserAddRows="False"
                            AreRowDetailsFrozen="True"
                            CanUserReorderColumns="False"
                            CanUserResizeColumns="True"
                            CanUserResizeRows="False"
                            SelectionUnit="Cell"
                            RowDetailsVisibilityMode="VisibleWhenSelected"
                            ItemsSource="{Binding Grades, Mode=TwoWay}">
                            <dg:DataGrid.Columns>
                                <dg:DataGridTemplateColumn CanUserResize="False" CanUserSort="False" Width="32" IsReadOnly="True">
                                    <dg:DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <Button Content="+" Width="28" Height="28" />
                                        </DataTemplate>
                                    </dg:DataGridTemplateColumn.CellTemplate>
                                </dg:DataGridTemplateColumn>
                                <dg:DataGridTemplateColumn CanUserResize="False" CanUserSort="False" Width="32" IsReadOnly="True">
                                    <dg:DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}" VerticalAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" />
                                        </DataTemplate>
                                    </dg:DataGridTemplateColumn.CellTemplate>
                                </dg:DataGridTemplateColumn>
                                <dg:DataGridTemplateColumn Header="Name" IsReadOnly="True" Width="550">
                                    <dg:DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <TextBlock Margin="5" Text="{Binding Name, Mode=TwoWay}" VerticalAlignment="Center" />
                                        </DataTemplate>
                                    </dg:DataGridTemplateColumn.CellTemplate>
                                </dg:DataGridTemplateColumn>
                            </dg:DataGrid.Columns>
                            <dg:DataGrid.RowDetailsTemplate>
                                <DataTemplate>
                                    <dg:DataGrid Margin="25,0,0,0" 
                                        AutoGenerateColumns="False" 
                                        CanUserAddRows="False"
                                        AreRowDetailsFrozen="True"
                                        CanUserReorderColumns="False"
                                        CanUserResizeColumns="True"
                                        CanUserResizeRows="False"
                                        SelectionUnit="Cell"
                                        ItemsSource="{Binding Notes, Mode=TwoWay}">
                                        <dg:DataGrid.Columns>
                                            <dg:DataGridTemplateColumn CanUserResize="False" CanUserSort="False" Width="32" IsReadOnly="True">
                                                <dg:DataGridTemplateColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                                                    </DataTemplate>
                                                </dg:DataGridTemplateColumn.CellTemplate>
                                            </dg:DataGridTemplateColumn>
                                            <dg:DataGridTemplateColumn Header="Note" IsReadOnly="True" Width="550">
                                                <dg:DataGridTemplateColumn.CellTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Margin="5" Text="{Binding Note, Mode=TwoWay}" VerticalAlignment="Center" />
                                                    </DataTemplate>
                                                </dg:DataGridTemplateColumn.CellTemplate>
                                            </dg:DataGridTemplateColumn>
                                        </dg:DataGrid.Columns>
                                    </dg:DataGrid>
                                </DataTemplate>
                            </dg:DataGrid.RowDetailsTemplate>
                        </dg:DataGrid>
                    </DataTemplate>
                </dg:DataGrid.RowDetailsTemplate>


            </dg:DataGrid>

Due to the RowDetailsVisibilityMode property when it is set to VisibleWhenSelected, the Node DataGridDetailsPresenter for the rows have 0 children. When the property is set to Visible I can see the DataGridDetailsPresenter children.

How can I force the inclusion of all the nodes in the Visual tree for when the RowDetailsVisibilityMode property is VisibleWhenSelected?

Any input is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:48:20+00:00Added an answer on May 25, 2026 at 11:48 am

    What are you trying to accomplish?

    Unless the the RowDetails are visible they would not be in the Visual Tree unless could force their creation by setting the RowDetailsVisibilityMode to Visible but setting the RowDetails DataGrid visibility to Collapsed. This may not work. I don’t know if the DataGrid would be in the Visual Tree if set to Collapsed in 3.5.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this nice little MSBuild-based daily build setup that I use on my
I might end up having to build this, but it would be nice if
I'm trying to build a nice looking config-screen using UITableView (much like the settings
I would like to build a web interface to present logdata. This should be
I've got a nice power-shell driven post-build script that does some magic mumbo-jumbo for
I want to build a nice API (C#) to make it easier for people
So I've got a nice Java project, build with Ant to a /dist folder.
I've built a nice website system that caters to the needs of a small
I've got a nice little class built that acts as a cache. Each item
I need some inspiration on how to build a nice progress bar for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.