I have a page with one radgrid on it. This page contains different sets of columns depending on how the user gets to the page. In all cases the grid offers Grouping. Since I cannot declare the columns ahead of time and I allow the user to group by whatever he/she chooses, how can i get specific columns to show aggregates in the group footers when grouping is active?
I can get footers to contain text by doing something simple like:
| Protected Sub Radgrid_ItemDataBound(ByVal source As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
| If TypeOf e.Item Is GridGroupFooterItem Then |
| Dim footer As GridGroupFooterItem = e.Item |
| Try |
| footer("ReworkCosts").Text = "Sum of Rework Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("MaterialCosts").Text = "Sum of Material Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("ScrapCosts").Text = "Sum of Scrap Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("DefectCosts").Text = "Sum of Defect Costs: $" |
| Catch ex As Exception |
| End Try |
| Try |
| footer("QNote").Text = "Count of Qnotes: " |
| Catch ex As Exception |
| End Try |
| Try |
| footer("MRCs").Text = "Count of MRCs: " |
| Catch ex As Exception |
| End Try |
| Try |
| footer("SCARs").Text = "Count of SCARs: " |
| Catch ex As Exception |
| End Try |
| End If |
| End Sub |
...but I don't know how to access all of the items in a specific column of that group so that I can add/count them and concatenate themm to the end of my string.
Any recommendations?
I am using VB.NET, .NET 3.5