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

Setting FooterRowStyle via GridView Style fail

0 Answers 201 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex Martin
Top achievements
Rank 1
Alex Martin asked on 08 Oct 2013, 12:37 PM
I'm trying to add a generic footer row to all my GridView via my style by I keep getting the following error.

'{DependencyProperty.UnsetValue}' is not a valid value for property 'FooterRowStyle'.


        <Style TargetType="telerik:RadGridView"
               x:Key="ManagementWithSummaryStyleLocal">
            <Setter Property="RowIndicatorVisibility"
                    Value="Visible" />
            <Setter Property="IsSynchronizedWithCurrentItem"
                    Value="True" />
            <Setter Property="EditTriggers"
                    Value="CellClick" />
            <Setter Property="GroupRenderMode"
                    Value="Flat" />
            <Setter Property="GridLinesVisibility"
                    Value="Both" />
            <Setter Property="CanUserFreezeColumns"
                    Value="False" />
            <Setter Property="AutoGenerateColumns"
                    Value="False" />
            <Setter Property="ShowGroupPanel"
                    Value="False" />
            <Setter Property="CanUserReorderColumns"
                    Value="False" />
            <Setter Property="ValidatesOnDataErrors"
                    Value="Default" />
            <Setter Property="ActionOnLostFocus"
                    Value="CommitEdit" />
            <Setter Property="ShowColumnFooters"
                    Value="True" />
            <Setter Property="FooterRowStyle"
                    Value="{StaticResource ManagementGridViewFooterRowStyleLocal}" />
        </Style>
 
 
        <Style x:Key="ManagementGridViewFooterRowStyleLocal"
               TargetType="{x:Type telerik:GridViewFooterRow}">
            <Setter Property="Template"
                    Value="{StaticResource GridViewFooterRowTemplateLocal}" />
            <Setter Property="MinHeight"
                    Value="24" />
            <Setter Property="BorderThickness"
                    Value="0,0,0,1" />
        </Style>
 
 
 
        <ControlTemplate x:Key="GridViewFooterRowTemplateLocal"
                         TargetType="telerik:GridViewFooterRow">
            <Border MinHeight="{TemplateBinding MinHeight}"
                    Margin="{TemplateBinding Margin}"
                    Background="{TemplateBinding Background}"
                    Padding="{TemplateBinding Padding}">
                <telerik:SelectiveScrollingGrid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Orientation="Horizontal"
                                Margin="5,5,2,2">
                        <TextBlock Text="ITEMS: " />
                        <TextBlock Text="{Binding Items.ItemCount,                             
                                           RelativeSource={RelativeSource AncestorType=telerik:RadGridView}, Mode=OneWay}" />
                    </StackPanel>
                </telerik:SelectiveScrollingGrid>
            </Border>
        </ControlTemplate>



        <telerik:RadGridView Style="{StaticResource ManagementWithSummaryStyleLocal}" />
                   
      


No answers yet. Maybe you can help?

Tags
GridView
Asked by
Alex Martin
Top achievements
Rank 1
Share this question
or