Skip to main content

DxListEditorColumn Class

A multi-column editor’s column.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public class DxListEditorColumn :
    ComponentBase,
    IListEditorColumn

Remarks

The following editors can display data across multiple columns:

Follow the steps below to create columns:

  1. Add the <Columns>...</Columns> to the component’s markup to define the Columns collection.
  2. Fill the Columns collection with the DxListEditorColumn objects. The objects include the following customization options:

    • FieldName - Specifies the data source field that populates column items.
    • Caption - Specifies the column header.
    • Visible - Specifies the column visibility.
    • VisibleIndex - Specifies the column display order.
    • Width - Specifies the column width.

The code below adds three columns to the List Box component.

@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

Inheritance

Object
ComponentBase
DxListEditorColumn
See Also