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

How to Right Align Footer Total Column

2 Answers 232 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 2
Steve asked on 26 Oct 2010, 12:00 AM
How do I right align the footer column for a total?  The XAML below still results in a left aligned total in the footer row
<telerik:GridViewDataColumn x:Name="TotalCol" DataMemberBinding="{Binding Path=Total, Mode=OneWay}" Header="Total Hours" IsFilterable="False" IsSortable="False" DataFormatString="{}{0:F2}" TextAlignment="Right" >
    <telerik:GridViewDataColumn.AggregateFunctions>
        <telerik:SumFunction ResultFormatString="{}{0:F2}" SourceField="Total" />
    </telerik:GridViewDataColumn.AggregateFunctions>
    <telerik:GridViewDataColumn.Footer>
        <telerik:AggregateResultsList ItemsSource="{Binding}" >
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                        <TextBlock Text="{Binding FormattedValue}" TextAlignment="Right" />
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </telerik:AggregateResultsList>
    </telerik:GridViewDataColumn.Footer>
</telerik:GridViewDataColumn>

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 26 Oct 2010, 07:08 AM
Hello Steve Dentel,

You may set the property of the column - FooterTextAlignment:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" FooterTextAlignment="Right"/>
 

Sincerely yours,
Maya
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Steve
Top achievements
Rank 2
answered on 26 Oct 2010, 03:25 PM
Thanks, that did the trick!
Tags
GridView
Asked by
Steve
Top achievements
Rank 2
Answers by
Maya
Telerik team
Steve
Top achievements
Rank 2
Share this question
or