private void ChangeRole(AggregationRole role) { AggregationDef.Role = role; // set the role for Mobius AggregationDef.SetDefaultTypeIfUndefined(Qc.MetaColumn); // and default type if needed if (AggregationChangedDelegate != null) { AggregationChangedDelegate(this); } return; }
public void SetFromDetail(AggregationTypeDetail atd) { if ((Role == AggregationRole.ColumnGrouping && atd.Role == AggregationRole.RowGrouping) || (Role == AggregationRole.RowGrouping && atd.Role == AggregationRole.ColumnGrouping)) { Role = Role; // don't change role if both are grouping roles } else { Role = atd.Role; } SummaryType = atd.SummaryTypeId; GroupingType = atd.GroupingType; return; }
private void ChangeRole(AggregationRole role) { PivotGridFieldMx f = PivotGridField; ResultsField rfld = f.ResultsField as ResultsField; MetaColumn mc = rfld.MetaColumn; f.Aggregation.Role = role; // set the role for Mobius f.Aggregation.SetDefaultTypeIfUndefined(mc); // and default type if needed f.SyncDxAreaToMxRole(); // sync Dx Area if (UpdateViewWhenGridControlChanges) { View.UpdateViewFieldsFromGridFields(); } return; }
/// <summary> /// Key Mobius classes related to and/or extending the DX classes /// </summary> void PivotGridControlMx() { PivotGridControlMx pgcMx = new PivotGridControlMx(); // Mx method extensions of the DX PivotGridControl PivotGridFieldMx pgfMx = pgcMx.Fields[0] as PivotGridFieldMx; // Mx extensions of the DX PivotGridField { AggregationDef ad = pgfMx.Aggregation; // Grouping and summarization for Mx field { AggregationRole ar = ad.Role; // Role of field in agg/pivot (similar to DX Area) SummaryTypeEnum st = ad.SummaryType; // Type of Mx summary GroupingTypeEnum gt = ad.GroupingType; // Type of Mx grouping Decimal nis = ad.NumericIntervalSize; // interval size for numeric grouping } ResultsField rfld = pgfMx.ResultsField as ResultsField; // Mobius ResultsField, QueryColumn and MetaColumn associated with field } }
public ContextMenuStrip SetupAggregationRoleMenu( QueryColumn qc, AggregationDef ad, AggregationTypeChangedDelegate aggRoleChangedDelegate = null) { Qc = qc; // save call parms if (qc != null) { Qt = qc.QueryTable; } AggregationDef = ad; AggregationChangedDelegate = aggRoleChangedDelegate; AggregationRole r = ad.Role; ColumnAreaMenuItem.Checked = (ad.Role == AggregationRole.ColumnGrouping); RowAreaMenuItem.Checked = (ad.Role == AggregationRole.RowGrouping); DataAreaMenuItem.Checked = (ad.Role == AggregationRole.DataSummary); FilterAreaMenuItem.Checked = (ad.Role == AggregationRole.Filtering); UndefinedAreaMenuItem.Checked = (ad.Role == AggregationRole.Undefined); return(AggRoleMenu); }
/// <summary> /// Construct wiith an initial grouping type selected /// </summary> /// <param name="groupingTypeId"></param> public AggregationDef(GroupingTypeEnum groupingTypeId) { Role = AggregationRole.RowGrouping; GroupingType = groupingTypeId; }
/// <summary> /// Construct with an initial summary type selected /// </summary> /// <param name="summaryTypeId"></param> public AggregationDef(SummaryTypeEnum summaryTypeId) { Role = AggregationRole.DataSummary; SummaryType = summaryTypeId; }