Back to Devexpress

PivotGridControl.SavePivotGridToStream(Stream) Method

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-dot-savepivotgridtostream-x28-system-dot-io-dot-stream-x29.md

latest3.1 KB
Original Source

PivotGridControl.SavePivotGridToStream(Stream) Method

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

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public void SavePivotGridToStream(
    Stream stream
)
vb
Public Sub SavePivotGridToStream(
    stream As Stream
)

Parameters

NameTypeDescription
streamStream

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

SavePivotGridToFile

DataSource

Local Data Stores

Save and Restore Layout

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace