Skip to main content
A newer version of this page is available. .

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.v20.2.dll

NuGet Packages: DevExpress.Data, DevExpress.WindowsDesktop.Data

Declaration

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

Property Value

Type Default Description
Boolean **true**

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:

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

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.

See Also