C1.Silverlight.Olap.5 Assembly > C1.Olap Namespace > C1OlapEngine Class : ViewDefinition Property |
'Declaration Public Property ViewDefinition As System.String
public System.string ViewDefinition {get; set;}
The code below shows how to save an Olap 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 "OlapView".
public Form1() { InitializeComponent(); // load default view C1OlapEngine olap = GetOlapEngine(); string view = Properties.Settings.Default.OlapView; if (!string.IsNullOrEmpty(view)) { olap.ViewDefinition = Properties.Settings.Default.OlapView; } } protected override void OnClosed(EventArgs e) { // save current view as default C1OlapEngine olap = GetOlapEngine(); Properties.Settings.Default.OlapView = olap.ViewDefinition; Properties.Settings.Default.Save(); }