
| Visual Basic (Declaration) | |
|---|---|
Public NotInheritable Class PivotView Inherits System.Windows.Forms.UserControl | |
| C# | |
|---|---|
public sealed class PivotView : System.Windows.Forms.UserControl | |
This control takes the complexity out of standard data analysis tools and gives users a simple drag and drop environment that promotes exploring data visually. The PivotView class allows customization of various UI elements through the use of properties such as CardLayout, AppearanceSettings, GrapeCity.ActiveAnalysis.Layout.GridHeadersStyle, GrapeCity.ActiveAnalysis.Layout.TotalsPlacement. It is possible to configure availability of UI features using Permissions property. You can use PivotView control to analyze data from a database, OLAP cube, memory, locally saved cube, XML or text file. You can set the DataSource property to bind the PivotView control to a data source. If you want to analyze relational data then you should provide a schema file. See GrapeCity.ActiveAnalysis.DataSources.RdDataSource.CustomSchemaFile property description for more information. The PivotView class has undo/redo feature. See Undo, Redo methods. To control the behavior of the PivotView you can use AutoRefreshGrid, AutoSizeCells members. To change a view by program you can use BeginLayoutUpdate(String) method. See GrapeCity.ActiveAnalysis.Layout.ILayoutActions interface description.
The following code example demonstrates how to initialize PivotView to analyze OLAP cube. To run this example, paste the following code into a form. Call SetUpDataSource(), SetUpPivotView() and Connect() methods from the form's constructor.
| C# | Copy Code |
|---|---|
private MdxDataSource mdxDataSource; private PivotView pivotView; private void SetUpDataSource() { mdxDataSource = new MdxDataSource(); mdxDataSource.ConnectionString = "Provider=SQLOLEDB.1;Data Source=localhost;Initial Catalog=Adventure Works DW"; mdxDataSource.Perspective = "Adventure Works"; } private void SetUpPivotView() { pivotView = new PivotView(); pivotView.DataSource = mdxDataSource; pivotView.Dock = DockStyle.Fill; Controls.Add(pivotView); } private void Connect() { mdxDataSource.Connect(); } | |
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.ContainerControl
System.Windows.Forms.UserControl
GrapeCity.ActiveAnalysis.Windows.Forms.PivotView
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2