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

TableGroupContainerLayoutBuilder<T>.Group(String) Method

Initializes a group builder.

Namespace: DevExpress.Mvvm.DataAnnotations

Assembly: DevExpress.Mvvm.v18.2.dll

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