wpf datagrid sub-table inside a table datagrid

Grids for WPF Forum

Posted 6 years ago by Kaitlyn Chen
Version: 17.2.0660
Platform: .NET 4.5
Environment: Windows 8 (64-bit)
Avatar

Hi,

I want to add a sub-table datagrid inside a table datagrid using the Actipro ThemedDataGrid.

The following code works and the sub-datagrid table shows up. I applied the  Actipro ThemedDataGrid for the top datagrid table, but the sub-datagrid table I used the regular DataGrid control NOT the Actipro ThemedDataGrid. 

If I change the sub-datagrid table control to the Actipro ThemedDataGrid, the sub-datagrid table would not show up and it's empty. 

We want to apply all the datagrid control to the Actipro ThemedDataGrid, is there a way that we can do that?

 Thanks!

                        <controls:EditOnInvalidThemedDataGrid AutoGenerateColumns="True" Grid.Row="0"
                                    Name="GovernmentCasingDataGrid" 
                                    AutoGeneratingColumn="GovtCasingsDataGrid_AutoGeneratingColumn"      
                                    GotFocus="GovernmentCasingsDataGrid_GotFocus" 
                                                  >
                            <DataGrid.RowStyle>
                                <Style TargetType="DataGridRow">
                                    <Setter Property="DetailsVisibility" Value="{Binding Path=RowDetailsIsVisible}" />
                                </Style>
                            </DataGrid.RowStyle>

                            <DataGrid.RowDetailsTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="1427" />
                                            <ColumnDefinition Width="1*" />
                                            <ColumnDefinition Width="100*" />
                                        </Grid.ColumnDefinitions>
                                        <controls:EditOnInvalidDataGrid Name="CementDetailDataGrid" 
                                                                        Grid.Column="1" 
                                                                        HeadersVisibility="None" 
                                                                        ItemsSource="{Binding Path=CementDataGridLinesViewModelCollection}"  
                                                                        AutoGenerateColumns="True"
                                                                        AutoGeneratingColumn="CementDataGrid_AutoGeneratingColumn"
                                        >
                                        </controls:EditOnInvalidDataGrid>
                                    </Grid>
                                </DataTemplate>
                            </DataGrid.RowDetailsTemplate>
                   
                        </controls:EditOnInvalidThemedDataGrid>

[Modified 6 years ago]

Comments (3)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Kaitlyn,

It's hard to say what's causing the issue you are seeing.  Could you please put together a new simple sample project that is as minimal as possible but still shows the issue?  Then email that to our support address and reference this thread in your email.  Be sure to exclude the bin/obj folders from the ZIP and rename the .zip file extension so it doesn't get spam blocked.  Then we can debug with that to see what's going on.


Actipro Software Support

Posted 6 years ago by Kaitlyn Chen
Avatar

Hi,

It will take sometime to make the sample project. I want to know if Actipro ThemedDataGrid support the nested table structure or not?

If yes, how to sign the sub-table datagrid ItemsSource? If you have a sample/code for it, that would be great too.

Thanks, Kaitlyn

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi,

I'm not aware of anything that would prevent it from being used within a data template of another ThemedDataGrid.  

We don't really have any examples of embedding the data grid in this way.  But please note our ThemedDataGrid just styles the native WPF DataGrid and adds a couple options.  You should be able to find a lot of resources online about using the native Microsoft WPF DataGrid, and all those resources would apply to ThemedDataGrid too.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.