Current filter:
                                You should refresh the page.
                                Support Center
                                  • I'm working with a Master-Child grid. When the master row is expanded the child grid is shown. Now I want to give the child grid another background color.

                                    How can I achieve this??

                                    best regards.
                                    Lanzo van Slooten

                                1 Solution

                                Creation Date Rating Importance Sort by

                                Hi Lanzo,

                                To achieve this goal, you can use the RowStyle property in the following manner:

                                <dxg:GridControl ...> <dxg:GridControl.DetailDescriptor> <dxg:DataControlDetailDescriptor ...> <dxg:GridControl> <dxg:GridControl.View> <dxg:TableView> <dxg:TableView.RowStyle> <Style TargetType="dxg:GridRowContent"> <Setter Property="Background" Value="Red"/> </Style> </dxg:TableView.RowStyle> </dxg:TableView> </dxg:GridControl.View> </dxg:GridControl> </dxg:DataControlDetailDescriptor> </dxg:GridControl.DetailDescriptor> </dxg:GridControl>

                                Let me know if you need further assistance.


                                • Lanzo van Slooten 06.10.2013

                                  But RowStyle will not change the color of the header and the grouping row.


                                • To change these elements' appearance, perform the following steps:

                                  1. Override the GridViewBase.GroupRowStyle template in the manner demonstrated in my answer.

                                  2. Override the {dxgt:GridColumnHeaderThemeKey ResourceKey=ControlTemplate} control template. Please refer to the How to programmatically (VB) set the background color of a column header in DXGrid thread, where you can find an example demonstrating how to do this. Additionally, review the KA18580 KB article describing how to customize our themes for WPF.

                                  If you face difficulties accomplishing this task, feel free to contact us.


                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners