Current filter:
                                You should refresh the page.
                                  • Hello,

                                    I have a grid in a window as below :

                                    <Grid>
                                    <dxg:GridControl x:Name="EmployeeDetailsGrid" ItemsSource="{Binding Employees}" Background="Red">
                                    <dxg:GridControl.View>
                                    <dxg:TableView AllowEditing="False" ShowGroupPanel="False"/>
                                                </dxg:GridControl.View>
                                            </dxg:GridControl>
                                        </Grid>

                                    and for this grid, i want to set below style

                                    <Style TargetType="dxg:LightweightCellEditor">
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsEmployeeAgeMoreThan50}" Value="True">
                                                        <Setter Property="Background" Value="Yellow" />
                                                        <Setter Property="Foreground" Value="Black" />
                                                        <Setter Property="ToolTip" Value="Test ToolTip"/>
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>

                                    Where Employees is List of Employee class and Employee class contains IsEmployeeAgeMoreThan50 flag.

                                    I wan to change the background colour of the cell of a specific column based on this flag. Can you help me achieve this?

                                • Shravan Ananda 09.17.2019

                                  I have a Age column in my Model which i want to highlight on the grid

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                To access the Employee's IsEmployeeAgeMoreThan50 property from your custom cell style, you can use the following binding expression: Binding="{Binding RowData.Row.IsEmployeeAgeMoreThan50}". Please try this solution and let me know your results.

                                See also:
                                How to build binding paths

                                Thanks,
                                Michael

                                • Shravan Ananda 09.18.2019

                                  That worked fine for me. Thanks Michael.

                                  Thanks,
                                  Shravan

                                • Michael Ch (DevExpress Support) 09.18.2019

                                  You're welcome!