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

[Solved] Display Group Key in a GroupFooterTemplate

4 Answers 187 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.
jean-Marc
Top achievements
Rank 1
jean-Marc asked on 15 Feb 2011, 12:29 AM
Hi,
I'm trying to display the Group Key in my group footer the same way I'm doing in Group header, but the binding doesn't seems to work.
 <telerik:GridViewDataColumn.GroupFooterTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Vertical" Margin="5,0">
                                        <TextBlock Text="Summary for:" Margin="0,0,0,2" />
                                        <TextBlock Foreground="DarkGreen" FontWeight="Bold"  Text="{Binding Group.Key}" />

in my header the group key appears fine but I'm struggling to find an elegant way to display only SOME of my Aggregate results (not all of them as it is doing now).

Any ideas?
Regards
Jean-Marc



4 Answers, 1 is accepted

Sort by
0
jean-Marc
Top achievements
Rank 1
answered on 15 Feb 2011, 01:48 AM
Additional question: Is it possible to modify the caption of a Custom Aggregator to use a specific template? in other words I want to replace some of my verbose caption by clean icons?
thanks in advance
Jean-Marc
0
Maya
Telerik team
answered on 15 Feb 2011, 04:03 PM
Hi jean-Marc,

The DataContext of the GridViewGroupRow is the GroupViewModel that allows you to bind to the Group.Key property. However, the DataContext of the GroupFooter is not the same as the one of the GroupRow. 
Furthermore, if you want to specify the number of aggregates displayed in the group row, you may take a look at this forum thread for a reference.
As far as your last requirement is concerned, I would need a bit more details on it. Where do you want to place an icon - in the footers or in the group row ?

Best wishes,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
jean-Marc
Top achievements
Rank 1
answered on 15 Feb 2011, 06:59 PM
Thanks Maya.
For my second question, i want to place an icon in the group row header mainly as i haven't decided yet if i really will display the group footer. maybe in a second stage.
jean-Marc
0
Maya
Telerik team
answered on 16 Feb 2011, 11:07 AM
Hi jean-Marc,

You may predefine the GroupHeaderTemplate as demonstrated in this forum thread. 

Best wishes,
Maya
the Telerik team
Tags
GridView
Asked by
jean-Marc
Top achievements
Rank 1
Answers by
jean-Marc
Top achievements
Rank 1
Maya
Telerik team
Share this question
or