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

Radgrid Group Total

1 Answer 817 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prathap Narravula
Top achievements
Rank 1
Prathap Narravula asked on 03 Apr 2012, 10:00 AM

I had a profit and loss sheet displaying in radgrid.. I want to display the total credit and debit for each group. Can you have any solution to display totals for every group in Radgrid
Please find the attachment for better understanding of my problem

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 03 Apr 2012, 10:40 AM
Hello Prathap,

You can set ShowGroupFooter property as true and Aggregate as Sum for each columns. Here is the sample code.
aspx:
<telerik:RadGrid ShowGroupPanel="true" AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="SqlDataSource1" AllowFilteringByColumn="True" AllowSorting="True" ShowFooter="True" runat="server">
  <MasterTableView ShowGroupFooter="true">
    <Columns>
      <telerik:GridBoundColumn Aggregate="Sum" DataField="ProductID" HeaderText="Product ID" FooterText="Total: "></telerik:GridBoundColumn>
      <telerik:GridBoundColumn Aggregate="Sum" DataField="UnitPrice" HeaderText="Unit price" FooterText="Total: "></telerik:GridBoundColumn>
    </Columns>
 <GroupByExpressions>
  <telerik:GridGroupByExpression>
   <GroupByFields>
     <telerik:GridGroupByField FieldName="UnitPrice" />
   </GroupByFields>
   <SelectFields>
      <telerik:GridGroupByField FieldName="UnitPrice" HeaderText="Unit price" />
  </SelectFields>
 </telerik:GridGroupByExpression>
 </GroupByExpressions>
 </MasterTableView>
</telerik:RadGrid>

Thanks,
Princy.
Tags
Grid
Asked by
Prathap Narravula
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or