Skip to main content

DxListBox<TData, TValue>.ValueFieldName Property

Specifies the data source field that populates values for the List Box’s items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public string ValueFieldName { get; set; }

Property Value

Type Description

The field name.


If a List Box is bound to a field that stores IDs or other non-user-friendly values, you may want to use lookup functionality. You can replace IDs with human-readable strings and let users select values from a lookup list.

For example, the following image shows how lookup functionality is used for the Employee.ID field of the Employees data source object. The component finds the IDs from a different collection and replaces them with the corresponding DisplayText values.

List Box Value Field Scheme

Use the ValueFieldName property to specify a data source field to obtain item values from. To access the editor’s selected values, use the Values property.


If the ValueFieldName property is not specified and TValue and TData are different, the List Box component searches for a Value field in the data source. If the field is found and its type matches TValue, the component uses this field as a value field.

<DxListBox Data="@Employees.DataSource" 

@code {
    IEnumerable<int> Values { get; set; } = Employees.DataSource.Take(2).Select(t => t.ID);

Run Demo: List Box - Item Values


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