Skip to main content

DxComboBox<TData, TValue>.ValueExpression Property

Specifies a lambda expression that identifies the Value property’s bound value when the ComboBox is placed in the EditForm.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public Expression<Func<TValue>> ValueExpression { get; set; }

Property Value

Type Description

A lambda expression that identifies the bound value.


You can add the ComboBox editor to Blazor’s standard EditForm component to validate the Value property value. In this case, the ValueExpression property is used to obtain metadata about the value bound to the Value property.

You should specify the ValueExpression property if you handle the ValueChanged event and cannot use two-way binding.

<DxComboBox Data="@Strings" ...
            ValueExpression="@(() => value )"

@code {
    string value = null;
    // ...
    void ValueChanged(string MyString) {
        // ...

The ValueExpression property is set internally if you use the @bind attribute for the Value property to implement two-way binding.

<DxComboBox Data="@Strings" ...

@code {
    string newValue = null;
    string Value { get => newValue; set { newValue = value; InvokeAsync(StateHasChanged); } }
    // ...

The following exception occurs if you do not use two-way binding or the ValueExpression property:

DevExpress.Blazor.DxComboBox requires a value for the ‘ValueExpression’ property. It is specified automatically when you use two-way binding (‘bind-Value’).

See Also