OptionsColumnLayout.AddNewColumns Property
Gets or sets whether columns that exist in the current control but do not exist in a layout when it is restored should be retained.
Namespace: DevExpress.Utils
Assembly: DevExpress.Data.v24.1.dll
NuGet Package: DevExpress.Data
Declaration
[TypeConverter(typeof(BooleanTypeConverter))]
[XtraSerializableProperty]
public bool AddNewColumns { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true to retain columns that exist in the current control’s layout but do not exist in the layout being restored; false to remove such columns. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to AddNewColumns |
---|---|
OptionsLayoutGrid |
|
Remarks
This option affects how the control’s layout is restored. Set AddNewColumns to true to retain columns that exist in the current control’s layout but do not exist in the layout being restored. Otherwise, these columns are removed.
Use the OptionsColumnLayout.RemoveOldColumns property to remove the columns that exist in the layout being restored but do not exist in the current control.
Set the OptionsColumnLayout.StoreAllOptions property to true if you want to include the AddNewColumns or RemoveOldColumns 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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddNewColumns 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.