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

[Solved] GroupByExpressions Sum not working

1 Answer 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Regula
Top achievements
Rank 1
Regula asked on 15 May 2013, 10:05 AM
I have a RadGrid with a GroupByExpressions.

Everything works but when I use the aggregate, it simply doesn't aggregate...

I'm running: Telerik 2013.1.417.45

In attach a screenshot of the grid


Here a excerpt of the GroupByExpression:

 
<GroupByExpressions>
  <telerik:GridGroupByExpression>
    <SelectFields>
         <telerik:GridGroupByField FieldAlias="Institution" FieldName="Institution" HeaderValueSeparator=" : "
              SortOrder="Ascending"></telerik:GridGroupByField>
        <telerik:GridGroupByField FieldName="Value" FieldAlias="Value" HeaderText="Total" Aggregate="Sum" FormatString="{0:N2}" />
    </SelectFields>
   <GroupByFields>
          <telerik:GridGroupByField FieldName="Institution" SortOrder="Ascending"></telerik:GridGroupByField>
     </GroupByFields>
</telerik:GridGroupByExpression>
<telerik:GridGroupByExpression>
 <SelectFields>
        <telerik:GridGroupByField FieldAlias="Year" FieldName="Year" SortOrder="Ascending" FormatString="{0:D}" HeaderValueSeparator=" : "></telerik:GridGroupByField>
   </SelectFields>
    <GroupByFields>
            <telerik:GridGroupByField FieldName="Year" SortOrder="Ascending"></telerik:GridGroupByField>
     </GroupByFields>
   </telerik:GridGroupByExpression>
</GroupByExpressions>











1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 20 May 2013, 02:46 PM
Hi Regula,

It seems that there is a bug with the FieldAlias property. I will forward it to our developers who will fix it for the future releases. Until the actual fix, please remove the Institution FieldAlias:
<telerik:GridGroupByField ... FieldAlias="Institution"/>
And if needed, access and modify the cell content programmatically.

Alternative, you can use templates:
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/headerandfootertemplates/defaultcs.aspx

I have updated your Telerik points for bringing the problem to our attention. Sorry for any inconvenience caused.

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Regula
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or