Hi,
I'm trying to group 2 columns under one group and below is the code I'm using to achieve that. Somehow I'm not able to see the Groupfields in the markup. Any help is greatly appreciated.
private void AddActualsColumns(BudgetingGrid budgetingGrid) { for (int year = budgetingGrid.FirstYearToDisplay; year < budgetingGrid.BudgetingYear; year++) { string cellKey = year + "Total1"; GroupField actualsGroup = new GroupField(); actualsGroup.Header.Text = year.ToString(); actualsGroup.Key = cellKey + "Group"; budgetingGrid.UnderlyingGrid.Columns.Add(actualsGroup); BoundDataField actualsColumn = CreateAmountColumn(cellKey); actualsColumn.DataFieldName = cellKey; actualsColumn.Header.Text = "Total"; actualsColumn.CssClass = "CenterAlign"; actualsGroup.Columns.Add(actualsColumn); // Add the column to all bands foreach (BudgetingGrid.Band band in budgetingGrid.Bands) { band.UnderlyingBand.Columns.Add(actualsGroup); } } }