I'm having an issue with the Aggergate="Sum" I have a bunch of invoices with fees on them. I needs to display the data grouped by invoice and show the total of the fees in the group header along with a Grand total in the footer of the entire grid.
I'm using the following markup to do that. The issue is that when I include the SUM for the grand total in the footer. The Group header will only show the value of the last item in that group. The group header no longer rolls or sums up the fees in the group.
I'm using the following markup to do that. The issue is that when I include the SUM for the grand total in the footer. The Group header will only show the value of the last item in that group. The group header no longer rolls or sums up the fees in the group.
<telerik:RadGrid ID="rgFees" runat="server" AutoGenerateColumns="false" ShowFooter="True" Skin="Web20" Height="500px"> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings> <MasterTableView ShowGroupFooter="true" AllowMultiColumnSorting="true" GroupLoadMode="Client"> <Columns> <telerik:GridBoundColumn DataField="FeeDescription" HeaderText="Fee Description"> </telerik:GridBoundColumn> <telerik:GridBoundColumn Aggregate="Sum" DataField="TotalFee" HeaderText="Total*" FooterText="Total" DataFormatString="{0:C}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="InvoiceId" HeaderText="Invoice Number"> </telerik:GridBoundColumn> </Columns> <GroupByExpressions> <telerik:GridGroupByExpression> <GroupByFields> <telerik:GridGroupByField FieldName="InvoiceId" HeaderText="" /> </GroupByFields> <SelectFields> <telerik:GridGroupByField FieldName="InvoiceId" HeaderText=" " HeaderValueSeparator="Invoice # " /> <telerik:GridGroupByField FieldName="TotalFee" HeaderText=" " HeaderValueSeparator="Total: " Aggregate="Sum" FormatString="{0:C}" /> </SelectFields> </telerik:GridGroupByExpression> </GroupByExpressions> </MasterTableView> <ClientSettings AllowDragToGroup="false" /> <GroupingSettings ShowUnGroupButton="false" /> </telerik:RadGrid>
The following Code works and gives the correct group header sum. How do I get a GRAND TOTAL to show up in the footer for the entire grid.
<telerik:RadGrid ID="rgFees" runat="server" AutoGenerateColumns="false" ShowFooter="True"
Skin="Web20" Height="500px">
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView ShowGroupFooter="true" AllowMultiColumnSorting="true" GroupLoadMode="Client">
<Columns>
<telerik:GridBoundColumn DataField="FeeDescription" HeaderText="Fee Description">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TotalFee" HeaderText="Total*"
FooterText="Total" DataFormatString="{0:C}">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="InvoiceId" HeaderText="Invoice Number">
</telerik:GridBoundColumn>
</Columns>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<GroupByFields>
<telerik:GridGroupByField FieldName="InvoiceId" HeaderText="" />
</GroupByFields>
<SelectFields>
<telerik:GridGroupByField FieldName="InvoiceId" HeaderText=" " HeaderValueSeparator="Invoice # " />
<telerik:GridGroupByField FieldName="TotalFee" HeaderText=" "
HeaderValueSeparator="Total: " Aggregate="Sum" FormatString="{0:C}" />
</SelectFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
</MasterTableView>
<ClientSettings AllowDragToGroup="false" />
<GroupingSettings ShowUnGroupButton="false" />
</telerik:RadGrid>