Skip to main content

PivotGridControl.RestoreLayoutFromXml(String) Method

Restores the pivot grid layout from the specified XML file.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

public void RestoreLayoutFromXml(
    string fileName
)

#Parameters

Name Type Description
fileName String

A String value that specifies the target file name.

#Remarks

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

Note that the PivotGridControl.SaveLayoutToXml and RestoreLayoutFromXml methods directly access the file system, which is forbidden by the default Silverlight security sandbox. To use these methods, you should configure your application to require elevated trust. To learn how to do this, see the Trusted Applications MSDN topic.

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

You can also save and restore the pivot grid layout from a stream using the PivotGridControl.SaveLayoutToStream and PivotGridControl.RestoreLayoutFromStream methods respectively.

To learn more about layout serialization, see Save and Restore Layout.

See Also