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

GridTemplateColumn with 2 aggregates

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kathy
Top achievements
Rank 1
Kathy asked on 07 Jan 2011, 03:31 PM
I have a GridTemplateColumn which contains two fields, one is a count field and one is a dollar amount.  I want to have a footer aggregate for each column, just summing each column.  Is something like this doable?
<telerik:GridTemplateColumn UniqueName="TemplateColumn" >
        
      <HeaderTemplate>
       <table id="Table1" width="300" border="0">
        <tr>
         <td colspan="2" align="center"><b><%#  RadComboBox2.Text %></b></td>
        </tr>
        <tr>
         <td width="50%"><b># Exposures</b></td>
         <td width="50%"><b>Residual Risk</b></td>
        </tr>
       </table>
      </HeaderTemplate>
      <ItemTemplate>
      <asp:Label id="exp" runat="server" Width="150">
                          <%# DataBinder.Eval(Container.DataItem, "ExposureCount")%>
                       </asp:Label>
       <asp:Label id="risk" runat="server">
                          <%# DataBinder.Eval(Container.DataItem, "ResidualRisk", "{0:$###,###,###}")%>
                       </asp:Label>
  
        
      </ItemTemplate>
      </telerik:GridTemplateColumn>
Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Mike Nogen
Top achievements
Rank 1
answered on 07 Jan 2011, 03:55 PM
hello!

What I can see the easiest way would be to put those two values into seperate columns then the Aggregate  would work out of the box 
another solution could be to implement a Aggregate="Custom"
http://www.telerik.com/help/aspnet-ajax/grdtotalsingridfooters.html

/M
Tags
Grid
Asked by
Kathy
Top achievements
Rank 1
Answers by
Mike Nogen
Top achievements
Rank 1
Share this question
or