Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XRPivotGrid.RestoreLayoutFromStream(Stream) Method

Restores a pivot grid’s layout from the specified stream.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

public void RestoreLayoutFromStream(
    Stream stream
)

#Parameters

Name Type Description
stream Stream

A Stream descendant from which the pivot grid’s settings are read. If null (Nothing in Visual Basic), an exception is raised.

#Remarks

Use the RestoreLayoutFromStream method to load the pivot grid’s layout from the stream to which the layout was saved.

The XRPivotGrid.OptionsLayout property controls which settings should be restored from the stream.

#Example

The following sample code saves a Pivot Grid Control’s layout to a memory stream and then restores it.

System.IO.Stream stream;
stream = new System.IO.MemoryStream();
pivotGridControl1.SaveLayoutToStream(stream);
stream.Seek(0, System.IO.SeekOrigin.Begin);

// ...
pivotGridControl1.RestoreLayoutFromStream(stream);
stream.Seek(0, System.IO.SeekOrigin.Begin);
See Also