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

DxListEditorColumn.FieldName Property

Specifies the data source field that populates column items in multi-column editors.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(null)]
[Parameter]
public string FieldName { get; set; }

#Property Value

Type Default Description
String null

The field name.

#Remarks

Use the FieldName property to bind a multi-column editor’s column to a field from the editor’s data source. The editor generates user-friendly column captions based on field names. It adds spaces between the parts of the field names that begin with uppercase letters. For instance, the “First Name“ caption is displayed for the FirstName field. To specify a custom column caption, use the Caption property.

The following code snippet adds three columns to a List Box.

@using StaffData

<DxListBox Data="@Staff.DataSource"
           @bind-Values="@Values">
    <Columns>
        <DxListEditorColumn FieldName="Id" Width="50px" />
        <DxListEditorColumn FieldName="FirstName" Caption="Name"/>
        <DxListEditorColumn FieldName="LastName" Caption="Surname"/>
    </Columns>
</DxListBox>

@code {
    IEnumerable<Person> Values { get; set; } = Staff.DataSource.Take(1);
}

List Box - Multiple Columns

Run Demo: List Box – Multiple Columns

Watch Video: ComboBox - Multiple Columns

#Implements

See Also