PivotGridControl.RestoreLayoutFromXml(String, OptionsLayoutBase) Method
SECURITY NOTE
Deserializing layout settings from untrusted resources may create security issues. Review the following help topic for additional information: Safe Deserialization.
Restores a Pivot Grid Control’s layout using the specified settings from the specified XML file.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.2.dll
NuGet Package: DevExpress.Win.PivotGrid
#Declaration
public void RestoreLayoutFromXml(
string xmlFile,
OptionsLayoutBase options
)
#Parameters
Name | Type | Description |
---|---|---|
xml |
String | A string value specifying the path to the XML file from which the Pivot Grid Control’s settings are read. If the specified file doesn’t exist, an exception is raised. |
options | Options |
A Options |
#Remarks
Use the RestoreLayoutFromXml method to load the Pivot Grid Control’s layout which was written to a file in the XML format using the PivotGridControl.SaveLayoutToXml method.
The options parameter determines which options should be restored from the file. For the Pivot Grid Control you can create a OptionsLayoutGrid object, customize it as required and then pass it as the options parameter. Only the options that are enabled in this object will be restored.
To restore all the options you can pass null or the static OptionsLayoutBase.FullLayout property as the options parameter.
The RestoreLayoutFromXml overload without the options parameter restores only the options which are specified by the Pivot Grid Control’s PivotGridControl.OptionsLayout property.
Note
When restoring a layout during a form load (for instance, in your Form.