public override int GetRowsCount(RenderContext context) { if (context.GroupValues != null) { if (ColumnAggregateRowsCountHandler != null) { return(ColumnAggregateRowsCountHandler(context.Journal, context.GroupValues)); } return(base.GetRowsCount(context)); } context.LoadData(BaseJournalCrossTable); if (ColumnRowsCountHandler != null) { return(ColumnRowsCountHandler(context.GetDataRow <TDataRow>())); } int count; if (ExecuteGetRowsCount(context, out count)) { return(count); } return(1); }
public override string GetName(RenderContext context) { if (context.GroupValues != null) { if (ColumnAggregateNameHandler != null) { return(ColumnAggregateNameHandler(context.CrossColumnId, context.GroupValues)); } return(GetGroupName(context)); } var row = context.GetDataRow <TDataRow>(); if (row == null) { return(string.Empty); } if (GetNameHandler != null && !_executeGetName) { _executeGetName = true; try { return(GetNameHandler(context)); } finally { _executeGetName = false; } } if (ColumnNameHandler != null) { return(ColumnNameHandler(row)); } return(base.GetName(context)); }
public override bool ShowAsTemplate(RenderContext context) { if (context.AggregateDataRow == null) { context.AggregateDataRow = GetAggregateRow(context, context.GetDataRow <TRow>()); } return(base.ShowAsTemplate(context)); }
public override string GetName(object row, object item, string crossColumnId, object[] groupValues) { if (row == null && _getNameContext != null) { row = _getNameContext.GetDataRow <TRow>(); } return(base.GetName(GetAggregateRow(_getNameContext, (TRow)row), item, crossColumnId, groupValues)); }
public override int GetRowsCount(RenderContext context) { var row = context.GetDataRow <TRow>(); if (CrossTable == null && row != null && !IsCrossColumn && context.GroupValues == null) { return(BaseCrossTable.GetGroupRowsCount(context)); } return(base.GetRowsCount(context)); }
public override object GetDataItem(RenderContext context) { var row = context.GetDataRow <TRow>(); if (CurrentValues.ContainsKey(row)) { var rows = CurrentValues[row]; if (rows.Count > context.RowIndex) { return(rows[context.RowIndex]); } } return(null); }
public override string GetName(RenderContext context) { _getNameContext = context; try { if (context.AggregateDataRow == null) { context.AggregateDataRow = GetAggregateRow(context, context.GetDataRow <TRow>()); } return(base.GetName(context)); } finally { _getNameContext = null; } }
public override object GetValue(RenderContext context, bool allowGetGroupValue) { _getValueContext = context; try { if (context.AggregateDataRow == null) { context.AggregateDataRow = GetAggregateRow(context, context.GetDataRow <TRow>()); } return(base.GetValue(context, allowGetGroupValue)); } finally { _getValueContext = null; } }
public override object GetValue(RenderContext context) { if (context.GroupValues != null) { if (ColumnAggregateValueHandler != null) { return(ColumnAggregateValueHandler(context.CrossColumnId, context.GroupValues)); } return(GetGroupValue(context)); } context.LoadData(BaseJournalCrossTable); var row = context.GetDataRow <TDataRow>(); if (row == null) { return(null); } if (GetValueHandler != null && !_executeGetValue) { _executeGetValue = true; try { return(GetValueHandler(context)); } finally { _executeGetValue = false; } } if (ColumnValueHandler != null) { return(ColumnValueHandler(row)); } return(base.GetValue(context)); }
public override int GetRowsCount(RenderContext context) { if (context.GroupValues != null) { return(base.GetRowsCount(context)); } int count; if (ExecuteGetRowsCount(context, out count)) { return(count); } var row = context.GetDataRow <TRow>(); if (CrossTable != null) { context.LoadData(CrossTable); if (CrossTable.RowValues.ContainsKey(row)) { return(1); } if (CrossTable.CurrentValuesRows != null && CrossTable.CurrentValuesRows.ContainsKey(row)) { return(CrossTable.CurrentValuesRows[row].Count); } return(CrossTable.RowGroupedValues[row].Count); } if (IsCrossColumn) { return(BaseCrossTable.GetRowsCount(context)); } return(BaseCrossTable.GetRowsCount(context)); }
public override string GetRowNumber(RenderContext context) { if (RowNumberHandler != null) { return(RowNumberHandler((BaseJournalRow <TRow>)context.JournalRow, context.Journal, context.GetDataRow <TRow>())); } return(base.GetRowNumber(context)); }