/// <summary> /// Adds a new item to the collection of report columns. The ordinal is always 1 more than the number of columns, making the new column the right most column. /// </summary> /// <param name="name"></param> public void AddColumn(string name, int ordinal) { int count = ColumnOrder.Count; for (int i = ordinal; i < ColumnOrder.Count; i++) { ColumnOrder[i].Ordinal = i + 1; } ColumnOrder.Add(new ReportColumn(name, ordinal)); }
public void AddColumn(string name) { int count = ColumnOrder.Count; ColumnOrder.Add(new ReportColumn(name, count + 1)); }