DxFormLayoutItem.Field Property

Specifies a data source field assigned to the current layout item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public string Field { get; set; }

Property Value

Type Description
String

The data source field name.

Remarks

To specify a layout item’s caption, use the Caption property.

<DxFormLayout Data="@editFormData" CaptionPosition="CaptionPosition.Vertical">
    <DxFormLayoutItem Field="@nameof(FormDataItem.Name)" Caption="Contact Name:" />
    <DxFormLayoutItem Field="@nameof(FormDataItem.Birthday)" Caption="Birthday:"  />
    <DxFormLayoutItem Field="@nameof(FormDataItem.Worked)" Caption="Worked year(s):" />
</DxFormLayout>

@code {
    FormDataItem editFormData = new FormDataItem() {
        Name = "Nancy Davolio",
        Birthday = DateTime.Now.AddYears(-30),
        Worked = 3,
        Position = "Sales Representative"
    };
}

Run Demo: Form Layout - Bind to Data

See Also