corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridoptionslayout.md
Gets or sets whether to retain field groups that exist in the current control layout, but do not exist in the layout being restored.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.PivotGrid.v25.2.Core.dll
NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
[DefaultValue(false)]
public bool AddNewGroups { get; set; }
<DefaultValue(False)>
Public Property AddNewGroups As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true to retain field groups that exist in the current control layout, but do not exist in the layout being restored; false to destroy such field groups.
|
You can access this nested property as listed below:
| Library | Object Type | Path to AddNewGroups |
|---|---|---|
| WinForms Controls | PivotGridControl |
.OptionsLayout .AddNewGroups
| | .NET Reporting Tools | XRPivotGrid |
.OptionsLayout .AddNewGroups
|
The AddNewGroups property affects how the control layout is restored. If it is set to true , the field groups that exist in the current control layout, but do not exist in the layout being restored will be retained. Otherwise, these field groups will be destroyed.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddNewGroups 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.
pivot-grid-for-winforms-layout-upgrade/CS/WinPivotUpgradeLayout/Form1.cs#L20
pivotGridControlNew.OptionsLayout.Columns.RemoveOldColumns = false;
pivotGridControlNew.OptionsLayout.AddNewGroups = true;
pivotGridControlOld.OptionsLayout.LayoutVersion = "1.0";
pivot-grid-for-winforms-layout-upgrade/VB/WinPivotUpgradeLayout/Form1.vb#L23
pivotGridControlNew.OptionsLayout.Columns.RemoveOldColumns = False
pivotGridControlNew.OptionsLayout.AddNewGroups = True
pivotGridControlOld.OptionsLayout.LayoutVersion = "1.0"
See Also