This is a migrated thread and some comments may be shown as answers.

Selected Row color

1 Answer 268 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Clifford
Top achievements
Rank 1
Clifford asked on 09 Oct 2015, 01:24 PM

I have been trying to get a different color on a Grid, and all I have seen are where you have to override the ControlTemplate. I also tried setting the color of specific color resource, but that did not work either. Here is my xaml

  <Style x:Key="GridRadGridView" TargetType="{x:Type telerik:RadGridView}">
<Style.Resources>
<Style TargetType="telerik:GridViewHeaderCell"
BasedOn="{StaticResource {x:Type telerik:GridViewHeaderCell}}">
<Setter Property="Background" Value="#014C6C" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="White" />
</Style>
</Style.Resources>
<Setter Property="AutoGenerateColumns" Value="False" />
<Setter Property="HeaderRowStyle" >
<Setter.Value>
<Style TargetType="telerik:GridViewHeaderRow"
BasedOn="{StaticResource {x:Type telerik:GridViewHeaderRow}}">
<Setter Property="Background" Value="#014C6C" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderThickness" Value="0" />
</Style>
</Setter.Value>
</Setter>
<Setter Property="GroupRowStyle">
<Setter.Value>
<Style BasedOn="{StaticResource {x:Type telerik:GridViewGroupRow}}"
TargetType="telerik:GridViewGroupRow">
<Setter Property="Background" Value="#F8F8F8" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="BorderThickness" Value="0 0 0 1" />
<!--<Setter Property="GroupHeaderTemplate">
<Setter.Value>
<DataTemplate >
</DataTemplate>
</Setter.Value>
</Setter>-->
</Style>
</Setter.Value>
</Setter>
<!--<Setter Property="RowStyle">
<Setter.Value>
<Style TargetType="telerik:GridViewRow"
BasedOn="{StaticResource {x:Type telerik:GridViewRow}}">
<Setter Property="Background" Value="#F9F9F9" />
--><!--<Trigger Property="IsCurrent" Value="True">
<Setter Property="Background" Value="#D7EFF9"/>
</Trigger>--><!--
</Style>
</Setter.Value>
</Setter>-->
<Setter Property="IsReadOnly" Value="True" />
<Setter Property="FontFamily" Value="Nunito" />
<Setter Property="ShowGroupPanel" Value="True" />
<Setter Property="FontSize" Value="14" />
<Setter Property="RowIndicatorVisibility" Value="Collapsed" />
<Setter Property="GridLinesVisibility" Value="Horizontal" />
<Setter Property="ScrollMode" Value="RealTime" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Visible" />
</Style>

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 13 Oct 2015, 07:43 AM
Hello Clifford,

My recommendation would be to run through the following resources:
1. Editing Control Templates in Expression Blend (if you are working with XAML binarines)
2. Editing Control Templates (if you are working with NoXaml binaries)
3. Styling RadGridView/ Styling Rows

Regards,
Maya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Clifford
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or