Hello Jonas,
This can be done via the RowStyle property of RadGridView. You can set a different background based on the IsPinned value of the GridViewRow element. For example:
<telerik:RadGridView.RowStyle>
<Style TargetType="telerik:GridViewRow">
<Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsPinned, Converter={StaticResource PinnedToBackgroundConverter}}"/>
</Style>
</telerik:RadGridView.RowStyle>
public class PinnedToBackgroundConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var isPinned = (bool)value;
return isPinned ? Brushes.Green : Brushes.Transparent;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Regards,
Martin Ivanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.