Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

LayoutGroup.CreateGroupForSelectedItems() Method

Creates a new group that will contain the currently selected child items.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public LayoutGroup CreateGroupForSelectedItems()

#Returns

Type Description
LayoutGroup

A LayoutGroup descendant that specifies the group that has been created.

#Remarks

This method creates a new group and adds the currently selected child items to this group. The new group is then selected.

To select and unselect specific items use the BaseLayoutItem.Selected property. All the selected items that belong to a group can be accessed via the LayoutGroup.SelectedItems collection.

If there is no selected item in the current group, the new group will not be created and the CreateGroupForSelectedItems method will return null. To check whether a new group can be created use the LayoutGroup.CanGroupSelectedItems method.

See Also