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

Group footer doesn't display aggregate value

5 Answers 144 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.
Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang asked on 04 Feb 2012, 07:26 AM
Hi telerik,

I can't display aggregate value in group footer. What am I missing ?
Grid has merged column  as following xaml snippet.

<telerik:RadGridView  x:Name="partGridView"  ItemsSource="{Binding Path=Model}"
          CanUserReorderColumns="False" CanUserSortColumns="False" AutoExpandGroups="True"       ShowGroupFooters="True"    FrozenColumnCount="1">
 
               <telerik:RadGridView.GroupDescriptors>
                   <data:GroupDescriptor Member="PartNo" DisplayContent="">
                       <telerik:GroupDescriptor.AggregateFunctions>
                           <telerik:FirstFunction Caption="적용단가 : " />
                       </telerik:GroupDescriptor.AggregateFunctions>
                   </data:GroupDescriptor>
               </telerik:RadGridView.GroupDescriptors>
                
               <telerik:RadGridView.ColumnGroups>
                   <telerik:GridViewColumnGroup  Name="PartKind" Header="구 분" />
                   <telerik:GridViewColumnGroup  Name="Jan" Header="1 월" />
                  <!-- more line continues  and next is part of of column  !-->
 
  <telerik:GridViewDataColumn Header="금 액" DataMemberBinding="{Binding Path=JanAmt}" Width="100" HeaderTextAlignment="Center"
                                                       TextAlignment="Right" FooterTextAlignment="Right" DataFormatString="{}{0:n0}" ColumnGroupName="Jan">
                       <telerik:GridViewDataColumn.AggregateFunctions>
                           <data:SumFunction SourceField="JanAmt" ResultFormatString="{}{0:n0}"/>
                       </telerik:GridViewDataColumn.AggregateFunctions>
                   </telerik:GridViewDataColumn>
                   <telerik:GridViewDataColumn Header="수 량" DataMemberBinding="{Binding Path=FebQty}" Width="80" HeaderTextAlignment="Center"
                                                       TextAlignment="Right" FooterTextAlignment="Right" DataFormatString="{}{0:n0}" ColumnGroupName="Feb">
                       <telerik:GridViewDataColumn.AggregateFunctions>
                           <data:SumFunction ResultFormatString="{}{0:n0}"/>
                       </telerik:GridViewDataColumn.AggregateFunctions>
                   </telerik:GridViewDataColumn>

As you can see attached image, can't display group summary.

I read forums and your documents and on line demos for 2 hours ,however  I can't find any
suitable explanation for this simple kind of thing in gridView.  Pls blame me.

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 06 Feb 2012, 10:03 AM
Hello,

 Have you tried ColumnGroupDescriptor instead GroupDescriptor?

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 12 Feb 2012, 05:56 AM
Hi, Blad

Thank you for your reply anyway. I've searched your document and don't understand
why this kind of change is not mentioned in Group aggregation section.
Even in event section, explanation of ColumnGroupDescriptor is not enough.
Would you point me any thread or sample application ?

TIA



 
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 16 Feb 2012, 04:54 PM
Hi telerik,

I can manage to show sum of column group in group footer with the sample of this thread.
http://www.telerik.com/community/forums/silverlight/gridview/group-footer-s-aggregate-values-not-shown.aspx
Too confused with GroupDescriptor and ColumnGroupDescriptor.

Now the problem is the sum of every column footer always shown in group header together.
I'd like to show only the content of group column in group header.  

Thanks
0
Vlad
Telerik team
answered on 16 Feb 2012, 05:00 PM
Hello,

 You can use ShowHeaderAggregates property of GridViewGroupRow to achieve this. Please check this thread for more info.

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Yonggu Kang
Top achievements
Rank 1
Iron
answered on 25 Feb 2012, 09:49 AM
Hi Vlad,

It works. Thank you for your reply.

Kang
Tags
GridView
Asked by
Yonggu Kang
Top achievements
Rank 1
Iron
Answers by
Vlad
Telerik team
Yonggu Kang
Top achievements
Rank 1
Iron
Share this question
or