I am trying to change an aggregate value on a footer value in my radgrid. I would like to be able to change the aggregate values based on the group header. So, for example..if the group header value is "App to Funding %" , I would like the aggregate value to be an average...all other group headers I would like a sum.
I assume I would do this in the Radgrid1_ItemDataBound...however I am struggling with exactly what I need to do. Here is what I have...that doesn't work:
Any suggestions?
Thanks.
I assume I would do this in the Radgrid1_ItemDataBound...however I am struggling with exactly what I need to do. Here is what I have...that doesn't work:
If TypeOf e.Item Is GridGroupHeaderItem Then
Dim item As GridGroupHeaderItem = CType(e.Item, GridGroupHeaderItem)
Dim groupDataRow As DataRowView = CType(e.Item.DataItem, DataRowView)
Dim column As GridBoundColumn
For Each column In groupDataRow.DataView.Table.Columns
If item.DataCell.Text = "App to Funding %" Then
column.Aggregate = GridAggregateFunction.Avg
End If
Next
End If
Any suggestions?
Thanks.