New to Telerik UI for WPF? Download free 30-day trial

Selection Color is not Respected when CellStyle or CellStyleSelector is Applied


Product Version 2020.2.617
Product RadGridView for WPF


The selection background is not shown when a custom CellStyle or CellStyleSelector is applied.


When a CellStyle or CellStyleSelector is applied, the background of the cells set through the CellStyle property overrides the selection background color of the GridViewRow.

To display the selection color instead of the custom background set for the cells, you can define a DataTrigger bound to the IsSelected property of the parent row.

<Style x:Key="CellStyle" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}"> 
    <Setter Property="Background" Value="Red" /> 
        <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:GridViewRow}}" Value="True"> 
            <Setter Property="Background" Value="{Binding Background}" /> 

See Also

In this article