Hi,
I'd like to be able to include group totals in the group headers of WebGrid. I have a webgrid which has an amount column. As the user's group the columns I'd like to sum the group amount column and show it in the header. I'm able to show total's in the footer for the last grouped column but not for the upper groupped columns. Here's a sample code;
Protected Sub UltraWebGrid1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraWebGrid1.DataBoundUltraWebGrid1.ExpandAll(True)End Sub
'UltraWebGrid1.DisplayLayout.GroupByRowDescriptionMaskDefault = "Value: [value]" This is where I think I need to add the each grouped header total value.
UltraWebGrid1.Columns(0).IsGroupByColumn = True
UltraWebGrid1.Columns(0).AllowGroupBy = AllowGroupBy.Yes
UltraWebGrid1.Columns(1).IsGroupByColumn = True
UltraWebGrid1.Columns(1).AllowGroupBy = AllowGroupBy.Yes
b.ColFootersVisible = ShowMarginInfo.Yes
e.Layout.Bands(0).Columns(0).FooterText = "dummy footer text - never appears"
c.DataType = "System.Double"
c.Format = "C"
c.CellStyle.HorizontalAlign = HorizontalAlign.Right
' set up footer summaries for total column
c.Footer.Key = "Total"
'c.Footer.Caption = "Total = "
c.Footer.Total = Infragistics.WebUI.UltraWebGrid.SummaryInfo.Sum
c.Footer.Formula = "ROUND(SUM([Total]),2)"
End Sub
Thanks.