A newer version of this page is available. Switch to the current version.

OptionsLayoutBase.LayoutVersion Property

Gets or sets the version of the layout.

Namespace: DevExpress.Utils

Assembly: DevExpress.Data.v19.2.dll

Declaration

[DefaultValue("")]
public string LayoutVersion { get; set; }
<DefaultValue("")>
Public Property LayoutVersion As String

Property Value

Type Default Description
String

String.Empty

A string representing the version of the layout.

Property Paths

You can access this nested property as listed below:

Show 36 property paths
Library Object Type Path to LayoutVersion
WinForms Controls BarManager
.OptionsLayout.LayoutVersion
ToolbarFormManager
.OptionsLayout.LayoutVersion
GanttControl
.OptionsLayout.LayoutVersion
AdvBandedGridView
.OptionsLayout.LayoutVersion
AdvBandedGridView
.OptionsLayout.LayoutVersion
BandedGridView
.OptionsLayout.LayoutVersion
BandedGridView
.OptionsLayout.LayoutVersion
BaseView
.OptionsLayout.LayoutVersion
ColumnView
.OptionsLayout.LayoutVersion
ColumnView
.OptionsLayout.LayoutVersion
CardView
.OptionsLayout.LayoutVersion
CardView
.OptionsLayout.LayoutVersion
GridView
.OptionsLayout.LayoutVersion
GridView
.OptionsLayout.LayoutVersion
LayoutView
.OptionsLayout.LayoutVersion
LayoutView
.OptionsLayout.LayoutVersion
WinExplorerView
.OptionsLayout.LayoutVersion
WinExplorerView
.OptionsLayout.LayoutVersion
WinExplorerView
.OptionsLayout.LayoutVersion
PivotGridControl
.OptionsLayout.LayoutVersion
DocumentViewerBarManager
.OptionsLayout.LayoutVersion
PrintBarManager
.OptionsLayout.LayoutVersion
SchedulerControl
.OptionsLayout.LayoutVersion
ResourcesTree
.OptionsLayout.LayoutVersion
TreeList
.OptionsLayout.LayoutVersion
PropertyGridControl
.OptionsLayout.LayoutVersion
VGridControl
.OptionsLayout.LayoutVersion
VGridControlBase
.OptionsLayout.LayoutVersion
ASP.NET Controls and MVC Extensions ASPxPivotGrid
.OptionsLayout.LayoutVersion
PivotGridWebOptionsLayout
.FullLayout.LayoutVersion
PivotGridWebOptionsLayout
.DefaultLayout.LayoutVersion
MVCxPivotGrid
.OptionsLayout.LayoutVersion
Reporting XRPivotGrid
.OptionsLayout.LayoutVersion
XRDesignBarManager
.OptionsLayout.LayoutVersion
XRDesignFieldList
.OptionsLayout.LayoutVersion
XRDesignReportExplorer
.OptionsLayout.LayoutVersion

Remarks

You should assign versions to layouts if you need to customize the control after an earlier version of the control's layout has been loaded and applied to the control.

Suppose an earlier version of an application was released and this contained a control (for instance, the XtraGrid) which had two columns (ID and Name). When running the application an end-user saved the layout of the control to an XML file. Then a new version of the application was designed. For instance, it added a new column (Gender) and grouping by this column. By default, when the previously saved layout is loaded within the new application the current layout of the control will be overridden. The Gender column will not be destroyed by default (this depends upon the control's OptionsColumnLayout.AddNewColumns setting). It will appear in a specific position in the control but data will not be grouped by this column.

To solve the problem, i.e. to customize the control's layout after an old layout has been loaded you should do the following:

  • When designing a new version of the control's layout set the version via the LayoutVersion property. At a minimum you need to ensure that the version of the current control's layout differs from the version of the saved layouts.
  • Handle the control's LayoutUpgrade event to implement a routine that will upgrade old layouts (for the grid control, use the BaseView.LayoutUpgrade event). This event occurs after a previously saved layout has been loaded and only if its version doesn't match the version of the current control's layout.

    For the above example you could handle the LayoutUpgrade event to apply grouping by the Gender column.

See Also