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

[Solved] GridView Aggregate Text Wrapping

1 Answer 122 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.
C
Top achievements
Rank 1
C asked on 29 Oct 2010, 04:43 PM
Hello,

Is it possible to configure the Aggreates (Sum, Avg etc) which appear in the footer row to wrap to another line if the column width has been reduced?

Currently the aggregate is provided via two text blocks one containing the Caption the other containing the calculated value within a StackPanel. Even with both text blocks set to wrap the text will be truncated.

Thanks and kind Regards
C

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Nov 2010, 01:11 PM
Hi C,

 Possible solution will be to use RadWrapPanel instead StackPanel in your custom Footer for desired column(s). Here is an example:

<telerik:GridViewDataColumn.Footer>
    <telerik:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center">
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <telerik:RadWrapPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <TextBlock VerticalAlignment="Center" Text="{Binding Caption}" />
                    <TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" />
                </telerik:RadWrapPanel>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <StackPanel Orientation="Vertical" />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
    </telerik:AggregateResultsList>
</telerik:GridViewDataColumn.Footer>

Please check also this demo for more info about custom footer aggregates. 

Greetings,
Vlad
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
Tags
GridView
Asked by
C
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or