/// <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; }
/// <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> /// 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 }