PivotGridControl.RestoreLayoutFromStreamAsync(Stream, AsyncCompletedHandler) Method

Restores the pivot grid layout from the specified stream asynchronously. Allows you to specify custom actions to be performed after this operation is completed.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v20.1.dll


public void RestoreLayoutFromStreamAsync(
    Stream stream,
    AsyncCompletedHandler asyncCompleted
Public Sub RestoreLayoutFromStreamAsync(
    stream As Stream,
    asyncCompleted As AsyncCompletedHandler


Name Type Description
stream Stream

A Stream descendant that stores the pivot grid's layout.

asyncCompleted AsyncCompletedHandler

An AsyncCompletedHandler delegate referencing a method that should be executed after the operation is completed.


The RestoreLayoutFromStreamAsync method is asynchronous. It starts executing the related operation in a background thread, and immediately returns control. The primary UI thread is not blocked, allowing the application to continue responding to end-user actions. For more information about the asynchronous mode, see Asynchronous Mode.

To save the pivot grid layout, use the PivotGridControl.SaveLayoutToStream method.

Note that you should specify unique names for all pivot grid fields to correctly save and restore the layout. You can do this using the PivotGridField.Name property.

To learn more, see Save and Restore Layout.

See Also