Current filter:
                                You should refresh the page.
                                  • I am using a wpf gridcontrol.
                                    Some column have a Allowfocus property binded to a row depending property.

                                    I would like that these cells appear with a different aspect (I think of a different background color).

                                    Many thanks

                                1 Solution

                                Creation Date Importance Sort by


                                For this purpose, implement the desired functionality in a custom CellStyle. The main idea is to declare a custom DataTrigger that will set the Background property to a required color when GridColumn's AllowFocus is False.

                                Each GridControl cell contains the EditGridCellData object in their DataContext. This object's Column property references a corresponding GridColumn. So, it should be sufficient to use the "Column.AllowFocus"  path in such a trigger:

                                <DataTrigger Binding="{Binding Column.AllowFocus}" Value="False"> <Setter Property="Background" Value="LightCyan"/> </DataTrigger>

                                Please try this in your application and let us know your results.

                                Also, refer to these help topics:
                                Appearance Customization
                                Styles and Templates Overview
                                Optimized Mode Styles and Templates


                                • Philippe Tailleur 1 08.16.2019

                                  Thanks a lot but how can I do it only when the line has the focus ? 

                                • Philippe Tailleur 1 08.16.2019

                                  Thanks a lot but how can I do it only when the lrow has the focus 

                                • Alexey Z (DevExpress Support) 08.16.2019


                                  In order not to mix several issue in one thread, I have created a separate ticket on your behalf (T807185: GridControl - How to change the appearance of the focused/selected cell). It has been placed in our processing queue and will be answered shortly.