OptionsColumnLayout.RemoveOldColumns Property

Gets or sets whether the columns that exist in a layout when it is restored but that do not exist in the current control should be discarded or added to the control.

Namespace: DevExpress.Utils

Assembly: DevExpress.Data.v21.1.dll

Declaration

[DefaultValue(true)]
public bool RemoveOldColumns { get; set; }

Property Value

Type Default Description
Boolean

true

true to discard the columns that exist in the layout being restored but do not exist in the current control; false to add these columns to the control.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to RemoveOldColumns
Cross-Platform Class Library OptionsLayoutGrid
.Columns.RemoveOldColumns
PivotGridOptionsLayout
.Columns.RemoveOldColumns
WinForms Controls TileViewOptionsLayout
.Columns.RemoveOldColumns
WinExplorerViewOptionsLayout
.Columns.RemoveOldColumns
VGridOptionsLayout
.Columns.RemoveOldColumns
ASP.NET Web Forms Controls PivotGridWebOptionsLayout
.Columns.RemoveOldColumns

Remarks

This option affects how the control’s layout is restored. If RemoveOldColumns is set to true the columns that exist in the layout being loaded but do not exist in the current control are not re-created. If the RemoveOldColumns property is set to false, these columns are added to the control.

Use the OptionsColumnLayout.AddNewColumns property to retain columns that exist in the current control’s layout but do not exist in the layout being restored.

Set the OptionsColumnLayout.StoreAllOptions property to true if you want to include the RemoveOldColumns or AddNewColumns property’s settings in the layout when it is saved to storage. These settings are restored when the layout is restored from storage.

Refer to the following help topic for more information on how the AddNewColumns and RemoveOldColumns settings determine the resulting combination of fields in the Pivot Grid’s restored layout: Save and Restore Layout.

See Also