Skip to main content

PivotGridControl.SavePivotGridToStream(Stream) Method

Saves the Pivot Grid Control’s data and full layout to the specified stream.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public void SavePivotGridToStream(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A Stream descendant to which data is saved.

Remarks

This method saves the original data that is provided by a data store to the specified stream. The data can be loaded later in the same grid control, or another, by creating a PivotFileDataSource object, and assigning it to the PivotGridControl.DataSource property. No connection to the original data store is required.

The SavePivotGridToStream method also saves the full layout along with the data to the stream. When the data is restored, the layout is restored as well, regardless of the layout settings specified by the PivotGridControl.OptionsLayout property.

Note

When creating a PivotFileDataSource object from a stream, do not dispose of the stream until the PivotFileDataSource object is assigned to the PivotGridControl.DataSource property.

Note

Saving PivotGrid’s data to a file or stream is not supported for Server Mode and OLAP data sources.

See Also