I'm trying to override the footer of a column to enter in a grand total. The grid is grouped by a column and I want to be able to plug in a grand total under the final group total. I have seen some posts/documentation on creating mutliple rows in the footer, but it involves javascript and knowing the index of the columns you want totaled. I was hoping to resolve this through code behind. I can get it to work, but it adds a "Grand Total" line for all group totals. I only want it to add it to the last one. I have code snippets below.. How can I get a handle to the column footer in the last group total to be able to add in a grand total? The columns in the grid can change, so the index of the column to be totaled is always changing. What's not changing is the datakey name of the column. Thanks in advance!!
<igtbl:UltraGridColumn Width="110px" IsBound="false" Format="$###,###.00" Key="mCostBasisWReInvest" BaseColumnName="mCostBasisWReInvest" HeaderText="Total Cost" DataType="Double">
<HeaderStyle HorizontalAlign="Right" Wrap="true" />
<Footer Total="Sum"></Footer>
</igtbl:UltraGridColumn>
_nfsRunningRowCount += e.Rows.Count
If _nfsRunningRowCount = _nfsRowCount Then
End If
End Sub
Hello pmdaniel99,
Miss read your post. I would recommend creating a hierarchical structure; each band will have its own total, effectively giving you sub and grand totals.
Patrick
Patrick - Thanks for the post! I currently only have 1 band as I did not see the need to create more. I thought they would be used when you want to see additional detail for a given row. I have all the detail and it's grouped by the column I need for sub totals. How would I implement the new band to handle the grand totals and group totals?
Much appreciation for the time!