TableGroupLayoutBuilder<T>.ContainsProperty<TProperty>(Expression<Func<T, TProperty>>) Method
Configures the specified ViewModel property to be displayed within the group.
Namespace: DevExpress.Mvvm.DataAnnotations
Assembly: DevExpress.Mvvm.v24.2.dll
Declaration
public TableGroupLayoutBuilder<T> ContainsProperty<TProperty>(
Expression<Func<T, TProperty>> propertyExpression
)
Parameters
Name | Type | Description |
---|---|---|
propertyExpression | Expression<Func<T, TProperty>> | A lambda expression that returns a ViewModel property. |
Type Parameters
Name |
---|
TProperty |
Returns
Type | Description |
---|---|
TableGroupLayoutBuilder<T> | The table group layout builder instance. |
Remarks
The ContainsProperty<TProperty> 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();
}
The ContainsProperty<TProperty> method does not support defining child properties.
See Also