Hello,
I have a custom Style Selector to modify rows backgorund when selected or mouse over in a RadGridView. The style selector works as expected when I select an item or do a multiple selection.
The problem comes when I perform a SelectAll() in my VM (or codeBehind). In this case the StyleSelector is not apply and is aparently using the default style for selected items.
Curiously it does work correctly when I select all the elements with the keyboard shortcut( ctrl + A)
Here is the style selector code:
<deltaTemplate:LastFoundInUpdateStyle x:Key="LastFoundInUpdateStyle">
<deltaTemplate:LastFoundInUpdateStyle.GridViewRowCoreStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="Background" Value="#FFFFFFFF"/>
<Setter Property="SelectedBackground" Value="#FFE0E0E0"/>
<Setter Property="MouseOverBackground" Value="#FFF5F5F5"/>
</Style>
</deltaTemplate:LastFoundInUpdateStyle.GridViewRowCoreStyle>
<deltaTemplate:LastFoundInUpdateStyle.LastFoundInUpdateGridViewRowCoreStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="Background" Value="LightGoldenrodYellow"/>
<Setter Property="SelectedBackground" Value="#FFF9F964"/>
<Setter Property="MouseOverBackground" Value="#FFF9F964"/>
</Style>
</deltaTemplate:LastFoundInUpdateStyle.LastFoundInUpdateGridViewRowCoreStyle>
</deltaTemplate:LastFoundInUpdateStyle>
<telerik:RadGridView
Grid.Row="0"
Margin="0,0,0,10"
x:Name="JobcardGridView"
SelectionMode="Extended"
ItemsSource="{Binding JobcardViewItemQueryableCollection}"
Style="{StaticResource RadGridViewJobcardRawReviewStyle}"
LeftFrozenColumnCount="2"
FilterOperatorsLoading="JobcardGridView_FilterOperatorsLoading"
FilteringDropDownStaysOpen="False"
HeaderRowStyle="{StaticResource GridViewHeaderRowStyle}"
AlternateRowStyleSelector="{StaticResource LastFoundInUpdateStyleAlternate}"
RowStyleSelector="{StaticResource LastFoundInUpdateStyle}">
Any idea where the problem might be?
Thanks in advance