Skip to main content

DxListBox<TData, TValue>.TextFieldName Property

Specifies the data source field that contains text for List Box items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public string TextFieldName { get; set; }

Property Value

Type Description

A string value that specifies a data source field’s name.


Use the TextFieldName property when you bind the List Box to a data source that store custom objects (IEnumerable<CustomType>). This property specifies the name of the data source field that contains text for the List Box items.

If the TextFieldName property is not specified, the List Box component searches for a Text field in the data source and uses this field as a text field. Otherwise, List Box populates its items with the CustomType.ToString() values.

@using BlazorApp.Data

<DxListBox Data="@Staff.DataSource"

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

ComboBox Editor Width

Run Demo: List Box - Overview


The TextFieldName property is not in effect if you specify the ItemDisplayTemplate or the ColumnCellDisplayTemplate property, or when you add columns to the List Box.


DevExpress.Blazor.IListBox<TData, TValue>.TextFieldName
See Also