ComponentOne FlexPivot for WinForms
ViewDefinition Property (C1FlexPivotEngine)
Example 

C1.DataEngine.4 Assembly > C1.FlexPivot Namespace > C1FlexPivotEngine Class : ViewDefinition Property
Gets or sets the FlexPivot view definition as an Xml string.
Syntax
'Declaration
 
Public Property ViewDefinition As System.String
public System.string ViewDefinition {get; set;}
Remarks
This property is typically used to persist the current FlexPivot view as an application setting.
Example

The code below shows how to save an FlexPivot view as an application setting when the application ends and how to load it when the application starts.

The code assumes that the application settings contain a string property called "FlexPivotView".

public Form1()
{
  InitializeComponent();
            
  // load default view
  C1FlexPivotEngine fp = GetFlexPivotEngine();
  string view = Properties.Settings.Default.FlexPivotView;
  if (!string.IsNullOrEmpty(view))
  {
    fp.ViewDefinition = Properties.Settings.Default.FlexPivotView;
  }
}
protected override void OnClosed(EventArgs e)
{
  // save current view as default
  C1FlexPivotEngine fp = GetFlexPivotEngine();
  Properties.Settings.Default.FlexPivotView = fp.ViewDefinition;
  Properties.Settings.Default.Save();
}
See Also

Reference

C1FlexPivotEngine Class
C1FlexPivotEngine Members