/// <summary> /// Render the view /// </summary> /// <param name="queryResultsControl"></param> public override void ConfigureRenderingControl() { if (!BuildUnpivotedResults(false)) { return; } PivotGridPropertiesMx p = PivotGridPropertiesMx; if (p == null) { return; } SyncMxFieldListWithSourceQuery( // be sure main grid & any pivot view fields are in synch BaseQuery, ref p.PivotFields); // be sure if (p.PivotFields == null) // if not defined then show dialog to allow user to define { PivotGridDialog.ShowDialog(this); } AssureQueryManagerIsDefined(BaseQuery); ConfigurePivotGridControl(); // configure the control to display the data PivotGridCtl.DataSource = Qm.DataTableManager.DataSource; // set the data table to start rendering PivotGridCtl.Visible = true; // be sure the control is visible ConfigureCount++; return; }
public PivotGridDialog() { InitializeComponent(); Instance = this; InitChartTypeComboBox(); }
/// <summary> /// Show the properties for the view /// </summary> /// <returns></returns> public override DialogResult ShowInitialViewPropertiesDialog() { SyncMxFieldListWithSourceQuery(BaseQuery, ref PivotGridPropertiesMx.PivotFields); DialogResult dr = PivotGridDialog.ShowDialog(this); return(dr); }
/// <summary> /// Show the panel /// </summary> /// <param name="f"></param> /// <param name="location"></param> public void Show( PivotGridFieldMx f, Point location, PivotGridDialog dialog) { string txt; Field = f; FieldCopy = new PivotGridFieldMx(); f.CopyField(FieldCopy); PgDlg = dialog; Control c = NoInterval; IntervalBinCount.Text = FixedIntervalSize.Text = VariableIntervals.Text = ""; //if (f.GroupIntervalMx == GroupBinType.FixedIntervalCount) //{ // //FixedIntervalCountOption.Checked = true; // //txt = f.GroupIntervalCount.ToString(); // //if (f.GroupIntervalCount <= 0) txt = "3"; // //IntervalBinCount.Text = txt; // //c = IntervalBinCount; //} //else if (f.GroupIntervalMx == GroupBinType.FixedIntervalSize) //{ // //FixedIntervalSizeOption.Checked = true; // //txt = f.GroupIntervalSize.ToString(); // //if (f.GroupIntervalCount <= 0) txt = "100"; // //FixedIntervalSize.Text = txt; // //c = FixedIntervalSize; //} //else if (f.GroupIntervalMx == GroupBinType.VariableIntervals) //{ // //VariableIntervalsOption.Checked = true; // //VariableIntervals.Text = f.GroupVariableIntervals; // //c = VariableIntervals; //} //else //{ // NoInterval.Checked = true; // c = NoInterval; //} Location = location; Show(); c.Focus(); return; }
/// <summary> /// Embed CustomizationForm in a PivotGridDialog.CustomizationFormPanel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Grid_ShowingCustomizationForm(object sender, CustomizationFormShowingEventArgs e) { if (InSetup) { return; } if (PivotGridDialog.Instance == null || !PivotGridDialog.Instance.InSetup) // activated from native DX menu not Mobius menu { DialogResult dr = PivotGridDialog.ShowDialog(View); return; } else // embed CustomizationForm in a PivotGridDialog.CustomizationFormPanel { e.ParentControl = PivotGridDialog.Instance.CustomizationFormPanel; e.CustomizationForm.Dock = DockStyle.Fill; } }
/// <summary> /// Show dialog & process results /// </summary> /// <returns></returns> public static DialogResult ShowDialog( ViewManager view) { if (Instance == null) { Instance = new PivotGridDialog(); } PivotGridDialog i = Instance; i.PivotView = view as PivotGridView; i.Setup(); i.PivotGridPanel.UpdateViewWhenGridControlChanges = false; // suspend view updating try { DialogResult dr = i.ShowDialog(SessionManager.ActiveForm); i.PivotGrid.DestroyCustomization(); // explicitly hide the customization return(dr); } finally { i.PivotGridPanel.UpdateViewWhenGridControlChanges = true; } // restore immediate view updating }