Group footer doesn't display aggregate value

6 posts, 0 answers
  1. Yong Gu Kang
    Yong Gu Kang avatar
    103 posts
    Member since:
    Jan 2010

    Posted 04 Feb 2012 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 06 Feb 2012 Link to this post

    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 >>
  3. Yong Gu Kang
    Yong Gu Kang avatar
    103 posts
    Member since:
    Jan 2010

    Posted 11 Feb 2012 Link to this post

    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



     
  4. Yong Gu Kang
    Yong Gu Kang avatar
    103 posts
    Member since:
    Jan 2010

    Posted 16 Feb 2012 Link to this post

    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
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 16 Feb 2012 Link to this post

    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 >>
  6. Yong Gu Kang
    Yong Gu Kang avatar
    103 posts
    Member since:
    Jan 2010

    Posted 25 Feb 2012 Link to this post

    Hi Vlad,

    It works. Thank you for your reply.

    Kang
Back to Top