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

LayoutGroup.AddGroup(String, BaseLayoutItem, InsertType) Method

Creates a new group with the specified caption at a position relative to an item within the current group.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v19.2.dll

Declaration

public LayoutGroup AddGroup(
    string text,
    BaseLayoutItem baseItem,
    InsertType insertType
)

Parameters

Name Type Description
text String

A String value that specifies the group’s caption. This value is assigned to the BaseLayoutItem.Text property.

baseItem BaseLayoutItem

A BaseLayoutItem descendant (owned by the current group) next to which a new group is inserted.

insertType DevExpress.XtraLayout.Utils.InsertType

A DevExpress.XtraLayout.Utils.InsertType enumeration value that specifies the position of the new group relative to the specified item.

Returns

Type Description
LayoutGroup

The newly created layout group.

Remarks

The following sample code uses the AddGroup method to create a new group that is positioned to the right of the first item within the parentGroup:

using DevExpress.XtraLayout;
using DevExpress.XtraLayout.Utils;
// ...

LayoutControlGroup newGroup = 
    parentGroup.AddGroup("New Group", parentGroup.Items[0], InsertType.Right);
See Also