PivotGridControl.SaveLayoutToStream(Stream, OptionsLayoutBase) Method

Saves a Pivot Grid Control's layout to the specified stream, using the specified settings.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v20.1.dll

Declaration

public void SaveLayoutToStream(
    Stream stream,
    OptionsLayoutBase options
)
Public Sub SaveLayoutToStream(
    stream As Stream,
    options As OptionsLayoutBase
)

Parameters

Name Type Description
stream Stream

A Stream descendant to which the Pivot Grid Control's layout is written.

options OptionsLayoutBase

A OptionsLayoutBase descendant that specifies which options should be saved.

Remarks

Use this SaveLayoutToStream method overload to save specific settings of a Pivot Grid Control to a stream. The settings can then be restored via the PivotGridControl.RestoreLayoutFromStream method.

The options parameter determines which options should be saved to the stream. For the Pivot Grid Control you can create a OptionsLayoutGrid object, customize it as required and then pass it as the options parameter. Only the options that are enabled in this object will be saved.

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

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

NOTE

The expansion states of field values are not saved by the SaveLayoutToStream 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