I have a page that displays 4 different grids all with footer totals. I want a way to take these totals and compute them so I can place them in a final total label on the page. Here is an example of one of the grid total columns:
All four grids have these columns. 2 of the grids are called "TotalPrice" and the other 2 are "TotalCost" I need to subtract the totals of the cost from the totals of the price and display the result in a label. If it is positive then I want it in Green and Negative in red.
First things first though, how do I get all of these values from the grids so that I can manipulate the values. Do I do it in the Page "Loan_Complete" event....? And how do I reference the aggregate footer column?
Thanks!
<telerik:GridBoundColumn DataField="TotalPrice" DataType="System.Decimal" |
HeaderText="Total" SortExpression="TotalPrice" UniqueName="TotalPrice" DataFormatString="{0:c}" Aggregate="Sum" FooterText="Total Due : " ReadOnly="True"> |
<FooterStyle HorizontalAlign="Center" Font-Bold="True" CssClass="SoldFooter"></FooterStyle> |
<HeaderStyle HorizontalAlign="Center" /> |
<ItemStyle HorizontalAlign="Center" /> |
</telerik:GridBoundColumn> |
All four grids have these columns. 2 of the grids are called "TotalPrice" and the other 2 are "TotalCost" I need to subtract the totals of the cost from the totals of the price and display the result in a label. If it is positive then I want it in Green and Negative in red.
First things first though, how do I get all of these values from the grids so that I can manipulate the values. Do I do it in the Page "Loan_Complete" event....? And how do I reference the aggregate footer column?
Thanks!