Skip to main content

TableGroupContainerLayoutBuilder<T>.Group(String) Method

Initializes a group builder.

Namespace: DevExpress.Mvvm.DataAnnotations

Assembly: DevExpress.Mvvm.v24.1.dll

NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation

Declaration

public TableGroupLayoutBuilder<T> Group(
    string groupName
)

Parameters

Name Type Description
groupName String

A group name.

Returns

Type Description
TableGroupLayoutBuilder<T>

The table group layout builder instance.

Remarks

The Group property is recognized by the GridControl, TreeListControl and PropertyGridControl.

See the example below.

void IMetadataProvider<DataAnnotations_FluentAPI>.BuildMetadata(MetadataBuilder<DataAnnotations_FluentAPI> builder) {
            builder.TableLayout()
                .Group("Product Details")
                    .ContainsProperty(p => p.ProductCategory)
                    .ContainsProperty(p => p.ProductName)
                .EndGroup()
                .GroupContainer("Order Details")
                    .Group("Main")
                        .ContainsProperty(p => p.CustomerName)
                        .ContainsProperty(p => p.OrderDate)
                    .EndGroup();
                .EndGroupContainer();
        }

Using the Group method is equivalent to assigning the [Display(GroupName = groupName)] data annotation attribute to a data property.

See Also