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

[Solved] GridView Column Footer Alignment

2 Answers 374 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cliff
Top achievements
Rank 1
Cliff asked on 01 Nov 2010, 02:24 PM
Hi,

I am using the Telerik RadGridview for Silverlight and cannot get the custom column footers to align correctly, I am using the following XAML :

                      <telerik:GridViewDataColumn.AggregateFunctions>
                            <telerikData:SumFunction SourceField="NumberOfOrders" />
                        </telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:GridViewDataColumn.Footer>
                            <telerik:AggregateResultsList ItemsSource="{Binding}" >
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Value, StringFormat=\{0:N0\}}"
                                                   HorizontalAlignment="Right"
                                                   FontWeight="Bold" />
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </telerik:AggregateResultsList>
                        </telerik:GridViewDataColumn.Footer>

The 'HorizontalAlignment="Right" ' appears to be ignored when the grid is rendered, I have tried putting a StackPanel around the TextBlock and aligning it but that also does not work.

Is there any way I can right justify the text within the TextBlock?

Regards,

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 01 Nov 2010, 02:51 PM
Hello Cliff,

You may set the property of the column - FooterTextAlignment:

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

All the best,
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
Cliff
Top achievements
Rank 1
answered on 01 Nov 2010, 03:52 PM
Hi,

Thanks, this did the trick.

Cliff.
Tags
GridView
Asked by
Cliff
Top achievements
Rank 1
Answers by
Maya
Telerik team
Cliff
Top achievements
Rank 1
Share this question
or