BaseView.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 the View’s layout using the specified settings from the specified XML file.
Namespace: DevExpress.XtraGrid.Views.Base
Assembly: DevExpress.XtraGrid.v24.2.dll
#Declaration
public void RestoreLayoutFromXml(
string xmlFile,
OptionsLayoutBase options
)
#Parameters
Name | Type | Description |
---|---|---|
xml |
String | A string value specifying the path to the XML file which contains the layout settings. If the specified file doesn’t exist a System. |
options | Options |
A Options |
#Remarks
Use the RestoreLayoutFromXml method to restore a View’s layout which was written to a file in XML format using the BaseView.SaveLayoutToXml method.
The options parameter determines which options should be restored from the XML file. For the 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
Specific options which are disabled in the options parameter are not affected.
To restore all the options pass null or a static OptionsLayoutBase.FullLayout property as the options parameter.
The RestoreLayoutFromXml overload without the options parameter restores only the options which are specified by the ColumnView.OptionsLayout property.
Note
When restoring a layout during a form load (for instance, in your Form.