Row Template

8 posts, 0 answers
  1. Israel
    Israel avatar
    5 posts
    Member since:
    Dec 2012

    Posted 04 Feb 2015 Link to this post

    Hi,

    I need to interfere in the row template, but once I override the template(without any interfering, just took straight from BLEND) I get the following problem:
    after adding a new row, the text to add a new row disappears and instead stays a strange empty row.
    please respond ASAP!

    Thanks,
    Rachel

    bellow is code:

    <Window x:Class="WpfApplication6.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Name="This"
          
               xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
              xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
            xmlns:local="clr-namespace:WpfApplication6"       
            Title="MainWindow" >
        <Window.Resources>
            <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
            <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
            <telerik:GridLineWidthToThicknessConverter x:Key="GridLineWidthToThicknessConverter"/>

            <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground1" Color="#7FFD0000"/>
            <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground2" Color="#FFFCC1C1"/>
            <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground3" Color="Red"/>
            <SolidColorBrush x:Key="GridView_InvalidEditIndicatorBackground4" Color="White"/>

            <SolidColorBrush x:Key="ItemOuterBorder_SelectedUnfocused" Color="#FF6F9DB5"/>
            <SolidColorBrush x:Key="ItemBackground_SelectedUnfocused" Color="White"/>
            <SolidColorBrush x:Key="ItemInnerBorder_SelectedUnfocused" Color="White"/>
            <SolidColorBrush x:Key="GridView_RowIndicatorCellBackground_Selected" Color="#FFF5F6F8"/>
            <LinearGradientBrush x:Key="GridView_HierarchyBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFE1E1E1" Offset="1"/>
                <GradientStop Color="#FFD2D2D2"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_RowIndicatorCellBackground" Color="#FFF5F6F8"/>
            <SolidColorBrush x:Key="GridView_NavigatorIndicatorBackground" Color="#FF075672"/>
            <LinearGradientBrush x:Key="GridView_NavigatorIndicatorBorder" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF12A500" Offset="1"/>
                <GradientStop Color="#FF5AAA50"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_EditIndicatorBackground1" Color="#7F848484"/>
            <SolidColorBrush x:Key="GridView_EditIndicatorBackground2" Color="#FFCBCBCB"/>
            <SolidColorBrush x:Key="GridView_EditIndicatorBackground3" Color="#FF848484"/>
            <SolidColorBrush x:Key="GridView_EditIndicatorBackground4" Color="White"/>
            <LinearGradientBrush x:Key="GridView_ErrorIndicatorBackground1" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFC9999" Offset="0"/>
                <GradientStop Color="#FFC26666" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_ErrorIndicatorBackground2" Color="White"/>
            <LinearGradientBrush x:Key="GridView_ErrorIndicatorBackground3" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="Red" Offset="0"/>
                <GradientStop Color="#FF990000" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_NewRowIndicatorBackground1" Color="White"/>
            <SolidColorBrush x:Key="GridView_NewRowIndicatorBackground2" Color="#FF83A5D2"/>
            <LinearGradientBrush x:Key="GridView_NewRowIndicatorBackground3" EndPoint="1,1" StartPoint="0,0">
                <GradientStop Color="#FF92CC89" Offset="0"/>
                <GradientStop Color="#FF288A1C" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="GridView_NewRowBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFE4E6EA" Offset="0.909"/>
                <GradientStop Color="#FFE3E3E3" Offset="0.074"/>
                <GradientStop Color="White" Offset="0.004"/>
                <GradientStop Color="White" Offset="0.049"/>
                <GradientStop Color="White" Offset="0.991"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="GridView_GroupRowIndicator" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF929394" Offset="0.46"/>
                <GradientStop Color="#FF353535"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ItemOuterBorder_Over" Color="#FFC2DAE3"/>
            <LinearGradientBrush x:Key="ItemInnerBorder_Over" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFE7F3F8" Offset="0"/>
                <GradientStop Color="#FFD4E7EE" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="ItemBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFE7F3F8" Offset="0"/>
                <GradientStop Color="#FFD4E7EE" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ItemOuterBorder_Selected" Color="#FF6F9DB5"/>
            <LinearGradientBrush x:Key="ItemInnerBorder_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFBBDBE6" Offset="0.12"/>
                <GradientStop Color="#FFB4D2DC" Offset="0"/>
                <GradientStop Color="#FF7FBFD4" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="ItemBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFBBDBE6" Offset="0.12"/>
                <GradientStop Color="#FFB4D2DC" Offset="0"/>
                <GradientStop Color="#FF7FBFD4" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ItemBackground" Color="White"/>
            <SolidColorBrush x:Key="ControlOuterBorder_Invalid" Color="#FFDB000C"/>
            <SolidColorBrush x:Key="ControlInnerBorder_Invalid" Color="White"/>

            <SolidColorBrush x:Key="ItemOuterBorder_Invalid" Color="#FFCE7D7D"/>
            <LinearGradientBrush x:Key="ItemInnerBorder_Invalid" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFEBF4FD"/>
                <GradientStop Color="#FFDBEAFD" Offset="1"/>
            </LinearGradientBrush>
            <LinearGradientBrush x:Key="ItemBackground_Invalid" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFCDCDC"/>
                <GradientStop Color="#FFFCC1C1" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ItemBackground_Disabled" Color="#FFE0E0E0"/>
            <SolidColorBrush x:Key="ItemInnerBorder_Disabled" Color="#FFF8F8F8"/>
            <SolidColorBrush x:Key="GridView_GridLinesItemBorder" Color="#FFB0B0B0"/>
            <SolidColorBrush x:Key="GridView_HeaderForeground_Selected" Color="White"/>
            <SolidColorBrush x:Key="GridView_HeaderInnerBorder" Color="#FF85BCD0"/>
            <SolidColorBrush x:Key="GridView_HeaderOuterBorder_Over" Color="#FF188CAD"/>
            <SolidColorBrush x:Key="GridView_HeaderInnerBorder_Over" Color="#FF85BCD0"/>
            <LinearGradientBrush x:Key="GridView_HeaderBackground_Over" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF35B8DC"/>
                <GradientStop Color="#FF188CAD" Offset="1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_HeaderOuterBorder_Selected" Color="#FF198FB0"/>
            <SolidColorBrush x:Key="GridView_HeaderInnerBorder_Selected" Color="#D85BBBD6"/>
            <LinearGradientBrush x:Key="GridView_HeaderBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF0E6888" Offset="0.171"/>
                <GradientStop Color="#FF137FA1" Offset="0.917"/>
                <GradientStop Color="#FF1AA1BD" Offset="0.958"/>
                <GradientStop Color="#FF032734" Offset="0.012"/>
                <GradientStop Color="#FF0A5672" Offset="0.083"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="GridView_SortIndicatorColor" Color="#FF8DC1D3"/>
            <LinearGradientBrush x:Key="GridView_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FF0E7094" Offset="1"/>
                <GradientStop Color="#FF1990B1"/>
            </LinearGradientBrush>
            <SolidColorBrush x:Key="ControlInnerBorder" Color="White"/>
            <SolidColorBrush x:Key="ControlOuterBorder" Color="#FFB1B1B1"/>

            <SolidColorBrush x:Key="GridView_ValidationTooltipForeground" Color="#FFFFFFFF"/>
            <SolidColorBrush x:Key="GridView_ValidationTooltipOuterBorder" Color="#FFDC000C"/>
            <SolidColorBrush x:Key="GridView_ValidationTooltipInnerBorder" Color="#FFFFFFFF"/>
            <LinearGradientBrush x:Key="GridView_ValidationTooltipBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFF424C" Offset="1"/>
                <GradientStop Color="#FFC92931"/>
            </LinearGradientBrush>
            <CornerRadius x:Key="GridView_ValidationTooltipCornerRadius">1</CornerRadius>
            <SolidColorBrush x:Key="DropDownButtonForeground" Color="#FF000000"/>
            <SolidColorBrush x:Key="DropDownButtonOuterBorder" Color="#FFB2B2B2"/>
            <LinearGradientBrush x:Key="DropDownButtonBackground" EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="White"/>
                <GradientStop Color="#FFE3E8EB" Offset="1"/>
            </LinearGradientBrush>

            <ControlTemplate x:Key="GridViewRow_ValidationToolTipTemplate" TargetType="ToolTip">
                <Grid x:Name="Root" Margin="5 0" Opacity="0" RenderTransformOrigin="0,0">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="OpenStates">
                            <VisualStateGroup.Transitions>
                                <VisualTransition GeneratedDuration="0"/>
                                <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualTransition>
                            </VisualStateGroup.Transitions>
                            <VisualState x:Name="Closed">
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                        <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Open">
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                        <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Grid.RenderTransform>
                        <TranslateTransform x:Name="xform" X="-25"/>
                    </Grid.RenderTransform>
                    <ItemsControl ItemsSource="{TemplateBinding Content}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Border
                                    MinHeight="22"
                                    Background="{StaticResource GridView_ValidationTooltipBackground}"
                                    BorderBrush="{StaticResource GridView_ValidationTooltipOuterBorder}"
                                    BorderThickness="1"
                                    CornerRadius="{StaticResource GridView_ValidationTooltipCornerRadius}">
                                    <Border BorderBrush="{StaticResource GridView_ValidationTooltipInnerBorder}" BorderThickness="1">
                                        <TextBlock Margin="4 1" MaxWidth="250" Foreground="{StaticResource GridView_ValidationTooltipForeground}" Text="{Binding}" TextWrapping="Wrap"/>
                                    </Border>
                                </Border>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel/>
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                    </ItemsControl>
                </Grid>
            </ControlTemplate>

            <ControlTemplate x:Key="GridViewRowTemplate" TargetType="grid:GridViewRow">
                <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="FocusStates">
                            <VisualState x:Name="Unfocused"/>
                            <VisualState x:Name="Focused">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicator" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                        <VisualStateGroup x:Name="SelectionStates">
                            <VisualState x:Name="Unselected"/>
                            <VisualState x:Name="SelectedUnfocused">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="BorderBrush">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemOuterBorder_SelectedUnfocused}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundInner_Over" Storyboard.TargetProperty="Background">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemBackground_SelectedUnfocused}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundInner_Over" Storyboard.TargetProperty="BorderBrush">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource ItemInnerBorder_SelectedUnfocused}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Normal"/>
                            <VisualState x:Name="MouseOver">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Over" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Selected">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Background_Selected" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NavigatorIndicatorBackground" Storyboard.TargetProperty="Background">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_RowIndicatorCellBackground_Selected}"/>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                        <VisualStateGroup x:Name="ValueStates">
                            <VisualState x:Name="RowValid"/>
                            <VisualState x:Name="RowInvalid">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ErrorIndicator" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                        <VisualStateGroup x:Name="EditStates">
                            <VisualState x:Name="ReadOnlyMode"/>
                            <VisualState x:Name="EditMode">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditIndicator" Storyboard.TargetProperty="Visibility">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="InvalidEditMode">
                                <Storyboard>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Invalid" Storyboard.TargetProperty="(UIElement.Visibility)">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="InvalidEditableIndicator" Storyboard.TargetProperty="Visibility">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Visibility>Visible</Visibility>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <grid:SelectiveScrollingGrid x:Name="grid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="SelectionBackground"
                            Grid.Column="2"
                            Grid.ColumnSpan="2"
                            Background="{TemplateBinding Background}"
                            Margin="{TemplateBinding Margin}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                        <Border x:Name="Background_Over"
                            Margin="1 1 1 2"
                            BorderThickness="1"
                            CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Over}"
                            Grid.Column="2"
                            Grid.ColumnSpan="2"
                            Visibility="Collapsed"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                            <Border x:Name="BackgroundInner_Over" BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Over}" Background="{StaticResource ItemBackground_Over}"/>
                        </Border>
                        <Border x:Name="Background_Selected"
                            Margin="1 1 1 2"
                            BorderThickness="1"
                            CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Selected}"
                            Grid.Column="2"
                            Grid.ColumnSpan="2"
                            Visibility="Collapsed"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                            <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Selected}" Background="{StaticResource ItemBackground_Selected}"/>
                        </Border>
                        <Border x:Name="Background_Invalid"
                            Margin="1 1 1 2"
                            BorderThickness="1"
                            CornerRadius="1"
                            BorderBrush="{StaticResource ItemOuterBorder_Invalid}"
                            Grid.Column="2"
                            Grid.ColumnSpan="2"
                            Visibility="Collapsed"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                            <Border BorderThickness="1" BorderBrush="{StaticResource ItemInnerBorder_Invalid}" Background="{StaticResource ItemBackground_Invalid}"/>
                        </Border>
                        <controls:GridViewToggleButton
                            Grid.Column="2"
                            x:Name="PART_HierarchyExpandButton"
                            Width="25"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Opacity="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToOpacityConverter}}"
                            IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}"
                            Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"
                            IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            IsTabStop="{TemplateBinding IsTabStop}"
                            telerik:StyleManager.Theme="Summer"/>
                        <Border Grid.Column="2" grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HasHierarchy, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                        <grid:DataCellsPresenter Grid.Column="3" telerik:StyleManager.Theme="Summer" x:Name="PART_DataCellsPresenter"/>
                        <Border x:Name="PART_RowBorder"
                            BorderBrush="{TemplateBinding HorizontalGridLinesBrush}"
                            BorderThickness="{Binding HorizontalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Bottom}"
                            Grid.ColumnSpan="4"
                            Grid.Column="1"
                            Grid.RowSpan="4"
                            VerticalAlignment="Bottom"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                        <Border
                            Background="{StaticResource GridView_HierarchyBackground}"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Grid.Column="2"
                            Grid.Row="2"
                            Grid.ColumnSpan="2"
                            Padding="6"
                            BorderBrush="{StaticResource ControlOuterBorder}"
                            BorderThickness="0,1"
                            Visibility="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}">
                            <ContentPresenter x:Name="PART_HierarchyChildPresenter" grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
                        </Border>
                        <grid:DetailsPresenter x:Name="PART_DetailsPresenter"
                            grid:SelectiveScrollingGrid.SelectiveScrollingClip="True"
                            Grid.Column="2"
                            Grid.ColumnSpan="2"
                            Grid.Row="1"
                            DetailsProvider="{TemplateBinding DetailsProvider}"
                            telerik:StyleManager.Theme="Summer"/>
                        <grid:IndentPresenter x:Name="PART_IndentPresenter"
                            telerik:StyleManager.Theme="Summer"
                            IndentLevel="{TemplateBinding IndentLevel}"
                            Grid.Column="1"
                            Grid.RowSpan="4"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                        <Border x:Name="PART_IndicatorPresenter"
                            Width="25"
                            VerticalAlignment="Stretch"
                            Grid.Column="0"
                            Visibility="{TemplateBinding RowIndicatorVisibility}"
                            grid:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"
                            Grid.RowSpan="3"
                            BorderBrush="{StaticResource ControlOuterBorder}"
                            BorderThickness="0 0 1 1">
                            <Border x:Name="NavigatorIndicatorBackground"
                                Background="{StaticResource GridView_RowIndicatorCellBackground}"
                                BorderBrush="{StaticResource ControlInnerBorder}"
                                BorderThickness="1">
                                <Grid>
                                    <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="11" Height="11" Visibility="Collapsed">
                                        <Path
                                            Stretch="Fill"
                                            Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z"
                                            Margin="0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Width="8"
                                            Height="8"
                                            Fill="{StaticResource GridView_NavigatorIndicatorBackground}"/>
                                    </Grid>
                                    <Grid x:Name="EditIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                        <Path Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                        <Path
                                            Fill="{StaticResource GridView_EditIndicatorBackground2}"
                                            Stretch="Fill"
                                            Margin="1"
                                            Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                        <Path Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                        <Path
                                            Fill="{StaticResource GridView_EditIndicatorBackground4}"
                                            Stretch="Fill"
                                            Margin="2"
                                            Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                                    </Grid>
                                    <Grid x:Name="InvalidEditableIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="10" Visibility="Collapsed">
                                        <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground1}" Stretch="Fill" Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z"/>
                                        <Path
                                            Fill="{StaticResource GridView_InvalidEditIndicatorBackground2}"
                                            Stretch="Fill"
                                            Margin="1"
                                            Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995 2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07 9,2.3841858E-07 10,2.3841858E-07 z"/>
                                        <Path Fill="{StaticResource GridView_InvalidEditIndicatorBackground3}" Stretch="Fill" Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10 3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 3,1 2,1 z"/>
                                        <Path
                                            Fill="{StaticResource GridView_InvalidEditIndicatorBackground4}"
                                            Stretch="Fill"
                                            Margin="2"
                                            Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001 3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z"/>
                                    </Grid>
                                    <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Visibility="Collapsed">
                                        <Path
                                            Fill="{StaticResource GridView_ErrorIndicatorBackground1}"
                                            Stretch="Fill"
                                            Margin="1"
                                            Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z"/>
                                        <Path
                                            Fill="{StaticResource GridView_ErrorIndicatorBackground2}"
                                            Stretch="Fill"
                                            Margin="7,3"
                                            Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z"/>
                                        <Path Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill" Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13 12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3 4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z"/>
                                        <ToolTipService.ToolTip>
                                            <ToolTip x:Name="validationTooltip" Placement="Bottom" Content="{TemplateBinding Errors}" Template="{StaticResource GridViewRow_ValidationToolTipTemplate}"/>
                                        </ToolTipService.ToolTip>
                                    </Grid>
                                    <Border x:Name="PART_RowResizer" Background="Transparent" Height="2" VerticalAlignment="Bottom" Cursor="SizeNS"/>
                                </Grid>
                            </Border>
                        </Border>
                    </grid:SelectiveScrollingGrid>
                </Border>
            </ControlTemplate>

            <Style x:Key="MyRowStyle" TargetType="{x:Type grid:GridViewRow}">
                <Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>
            </Style>
        </Window.Resources>
        <Grid >
            <telerik:RadGridView AutoGenerateColumns="True" Margin="20" RowStyle="{StaticResource MyRowStyle}"
                        CanUserDeleteRows="True"
                        CanUserInsertRows="True"
                        ItemsSource="{Binding MyList,
                                              Mode=TwoWay}"
                        ShowInsertRow="True"
                      />
        </Grid>

    </Window>

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Globalization;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    using Telerik.Windows.Controls;
    using Telerik.Windows.Controls.MaskedInput;

    namespace WpfApplication6
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            private List<Person> _myList;
            public List<Person> MyList
            {
                get { return _myList; }
                set { _myList = value; }
            }

            public MainWindow()
            {
                MyList = new List<Person>();
                MyList.Add(new Person() { ID = 9, Name = "Rachel", Amount = 55 });
                InitializeComponent();
                This.DataContext = this;
            }

        }
        public class Person
        {
           
            private int? _iD;
            [DisplayName("ID")]
            public int? ID
            {
                get { return _iD; }
                set { _iD = value; }
            }


            [DisplayName("Name")]
            public string Name { get; set; }

            [DisplayName("Amount")]
            public int Amount { get; set; }
        }

      
    }
















  2. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 04 Feb 2015 Link to this post

    Hello Rachel,

    Thank you for contacting us.

    I tested your code and it appears that this is a bug occuring when the RowStyle of RadGridView is set. I have logged it in our bug tracking system. You can track it's progress here: RowStyle property causes Adding New Item functionality to fail. We have also updated your account points as a gratitude for reporting this issue.

    As a workaround I can suggest you to extract a Style and set it to be based on our GridViewRowStyle and target the GridViewRow in it. For more information how to extract a Style please check the Editing Control Templates documentation article. I also set up a sample project for your convenience.

    Let me know how this works for you.

    Regards,
    Stefan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Israel
    Israel avatar
    5 posts
    Member since:
    Dec 2012

    Posted 05 Feb 2015 in reply to Stefan Link to this post

    I cannot open your example
  4. Israel
    Israel avatar
    5 posts
    Member since:
    Dec 2012

    Posted 05 Feb 2015 in reply to Stefan Link to this post

    and by the way, it doesn't occur when editing the row style' it happens when editing the row template.
     i wrote : 
     <Style x:Key="MyRowStyle" TargetType="{x:Type grid:GridViewRow}" >
                <!--<Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>-->
                <Setter Property="Height" Value="80"/>
            </Style>

    and then it works fine, just the new row height stays 80, but i can add new rows. 
  5. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 05 Feb 2015 Link to this post

    Hello Rachel,

    Thank you for clarifying this.

    Yes, you are right on that and I have changed the title of the feedback item accordingly.

    Styling the GridViewRow through Style works fine, but setting a row's Template through it is the functionality causing the issue.

    I am re-sending the sample project as there might have been some kind of an error in the one from my previous post.

    Regards,
    Stefan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Israel
    Israel avatar
    5 posts
    Member since:
    Dec 2012

    Posted 05 Feb 2015 in reply to Stefan Link to this post

    I cannot see any project attached to your latest post.
  7. Israel
    Israel avatar
    5 posts
    Member since:
    Dec 2012

    Posted 05 Feb 2015 in reply to Stefan Link to this post

    your answer wasn't correct.
    it is not basing on your default style which helps, it is putting the row style in the resources without a key! but this solution isn't good for me, cause i am using a style selector( in order to show different colors for even and odd rows) and then i cannot just put a style without a key, what can I do?
  8. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 09 Feb 2015 Link to this post

    Hi Rachel,

    In case your aim is to set different background color for odd and even GridViewRows, you can benefit from the Alternating Rows functionality. Please refer to our Alternate Rows online demo to check how to use the AlternateRowStyleSelector. Please note that the demo is for Silverlight but the same logic applies for WPF.

    I hope this helps.

    Kind Regards,
    Stefan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top