Skip to main content

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.v24.1.dll

NuGet Package: DevExpress.Data

Declaration

[TypeConverter(typeof(BooleanTypeConverter))]
[XtraSerializableProperty]
public bool RemoveOldColumns { get; set; }

Property Value

Type Description
Boolean

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:

Object Type Path to RemoveOldColumns
OptionsLayoutGrid
.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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RemoveOldColumns property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also