public PivotTableTotalColumnRender(PivotHeaderCell <T> current, PivotTableRenderOption <T> option, PivotAxisRenderOption headerOption, PivotTableColumnRender <T> parent = null) : base(current, option, headerOption, parent) { Contract.Requires(headerOption != null); Title = headerOption.TotalTitle; CssClass += " " + headerOption.TotalCssClass; }
public PivotTableHeaderRender(HeaderType headerType, IEnumerable <PivotColumn <T> > headers, PivotTableRenderOption <T> option) { Contract.Requires(headers != null); Contract.Requires(option != null); Headers = headers.ToList(); var topLevelHeader = headers.First(); var headerOption = option.Header[headerType]; if (headerOption.RenderTotal && headerOption.TotalPosition == OutputPosition.Above) { rootCells.Add(new PivotTableTotalColumnRender <T>(null, option, headerOption)); } foreach (var cell in topLevelHeader.Items) { rootCells.Add(new PivotTableColumnRender <T>(cell, option, headerOption)); } if (headerOption.RenderTotal && headerOption.TotalPosition == OutputPosition.Below) { rootCells.Add(new PivotTableTotalColumnRender <T>(null, option, headerOption)); } }