Unplanned
Last Updated: 30 Oct 2024 11:43 by Parag
Parag
Created on: 30 Oct 2024 11:43
Category: DataGrid
Type: Bug Report
2
DataGrid: Layout issue in row details when applying RowHeight and Grouping

when applying Grouping and RowHeight to the DataGrid and expand the row details, the following happens -> The DataGrid in the RowDetails only appears for alternate rows. 

In addition the RowHeight does not apply to the Grouping Row.

Workaround:

Remove the RowHeight from the DataGrid and set the CellContentStyle property to the columns and set the TextMargin to the DataGridTextCellStyle, and ButtonMargin to the DataGridToggleRowDetailsCellStyle. Here is an example when setting them to 0:

            <telerik:DataGridTextCellStyle x:Key="cellStyle"
                                           TextMargin="0"/>


            <telerik:DataGridToggleRowDetailsCellStyle x:Key="toggleStyle"
                                                       ButtonMargin="0"/>


            <telerik:RadDataGrid.Columns>
                <telerik:DataGridToggleRowDetailsColumn CellContentStyle="{StaticResource toggleStyle}"
                                                        IsFrozen="True"/>
                
                <telerik:DataGridTextColumn PropertyName="Country"
                                            CellContentStyle="{StaticResource cellStyle}"
                                            IsFrozen="True" 
                                            CanUserReorder="False"  />
                
                <telerik:DataGridTextColumn PropertyName="Capital" 
                                            CellContentStyle="{StaticResource cellStyle}" />
            </telerik:RadDataGrid.Columns>

0 comments