PivotGridControl.SaveLayoutToRegistry(String, OptionsLayoutBase) Method

Saves a Pivot Grid Control's layout to the specified system registry path, using the specified settings.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v20.1.dll

Declaration

public void SaveLayoutToRegistry(
    string path,
    OptionsLayoutBase options
)
Public Sub SaveLayoutToRegistry(
    path As String,
    options As OptionsLayoutBase
)

Parameters

Name Type Description
path String

A string value which specifies the system registry path to which the layout is saved.

options OptionsLayoutBase

A OptionsLayoutBase descendant that specifies which options should be saved.

Remarks

Use the SaveLayoutToRegistry method to save specific settings of a Pivot Grid Control to the system registry. The settings can then be restored via the PivotGridControl.RestoreLayoutFromRegistry method.

The options parameter determines which options should be saved to the registry. For the Pivot Grid Control a OptionsLayoutGrid object can be created, customized as required and then passed as the options parameter. Only the options that are enabled in this object will be saved.

To save all the options pass null or the static OptionsLayoutBase.FullLayout property as the options parameter.

The SaveLayoutToRegistry overload without the options parameter saves only the options which are specified by the PivotGridControl.OptionsLayout property.

For the path parameter you can define whole and partial registry keys. For example, if you define "Software\Company", the full path will be as follows: "HKEY_CURRENT_USER\Software\Company". To store a layout in a different root key define the entire path in the following form "HKEY_LOCAL_MACHINE\Software\Company".

NOTE

The expansion states of field values are not saved by the SaveLayoutToRegistry method.

TIP

You can utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls at once.

See Also