VGridControlBase.RestoreLayoutFromXml(String) Method

Restores a vertical grid's layout from the specified XML file.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

public virtual void RestoreLayoutFromXml(
    string xmlFile
)
Public Overridable Sub RestoreLayoutFromXml(
    xmlFile As String
)

Parameters

Name Type Description
xmlFile String

A string value which specifies the path to the XML file from which the vertical grid's settings are read. If the specified file doesn't exist, an exception is raised.

Remarks

Use the RestoreLayoutFromXml method to load the vertical grid's layout which was written to a file in the XML format using the VGridControlBase.SaveLayoutToXml method.

Examples

The following sample code saves the vertical grid's layout to an XML file and then applies it to another vertical grid control. The VGridControlBase.SaveLayoutToXml and VGridControlBase.RestoreLayoutFromXml methods are used for this purpose.

string filename = "c:\\XtraVerticalGridLayout.xml";
vGridControl1.SaveLayoutToXml(filename);
vGridControl2.DataSource = vGridControl1.DataSource;
vGridControl2.RestoreLayoutFromXml(filename);

Implements

DevExpress.Utils.Serializing.ISupportXtraSerializer.RestoreLayoutFromXml(String)
See Also