This question is locked. New answers and comments are not allowed.
Hi:
I've read in this forum that some of the standard themes have alternating row colors. But they don't for me. I'm defining the theme in app.xaml.cs:
I've tried setting the gridview's UseAlternateRowStyle="True" to no avail.
I've also tried the example I've seen in this forum to set the color directly, but I get a "Invalid attribute value radGridView:GridViewRow for property TargetType" error. My code is:
Any help would be appreciated. If there is a way to turn alternate lines on in the themes, I would prefer that as users will get a consistent look regardless of the theme they select.
Thanks in advance,
Terry
I've read in this forum that some of the standard themes have alternating row colors. But they don't for me. I'm defining the theme in app.xaml.cs:
| Telerik.Windows.Controls.StyleManager.ApplicationTheme |
| = new Telerik.Windows.Controls.Office_SilverTheme(); |
I've tried setting the gridview's UseAlternateRowStyle="True" to no avail.
I've also tried the example I've seen in this forum to set the color directly, but I get a "Invalid attribute value radGridView:GridViewRow for property TargetType" error. My code is:
| <UserControl |
| x:Class="KPIControl.ReportGrid" |
| xmlns:radGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| > |
| <Grid x:Name="LayoutRoot" Background="White"> |
| <radGridView:RadGridView x:Name="gvReport" ScrollViewer.HorizontalScrollBarVisibility="Visible" |
| ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollMode="Deferred" |
| > |
| <radGridView:RadGridView.Resources> |
| <Style x:Name="GridViewAlternateRowStyle" TargetType="radGridView:GridViewRow"> |
| <Setter Property="Background" Value="Red" /> |
| </Style> |
| </radGridView:RadGridView.Resources> |
| <radGridView:RadGridView.RowAppearance> |
| <radGridView:RowAppearanceSettings AlternateRowStyle="{StaticResource GridViewAlternateRowStyle}" /> |
| </radGridView:RadGridView.RowAppearance> |
Any help would be appreciated. If there is a way to turn alternate lines on in the themes, I would prefer that as users will get a consistent look regardless of the theme they select.
Thanks in advance,
Terry