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

System.ArgumentNullException: 'X' requires a value for the 'Expression' property

If your EditForm contains an editor that does not use two-way binding, one of the following exceptions can occur:

DevExpress.Blazor.DxComboBox requires a value for the ‘ValueExpression’ property. It is specified automatically when you use two-way binding (‘bind-Value’).
OR
InvalidOperationException: A value for the ‘ValuesExpression’ and ‘TextExpression’ properties not found.

To fix the issue, do one of the following:

  • Specify the Expression property for the properties you use. For example, if you use the Value property and the ValueChanged event separately, also specify the ValueExpression property.
    Razor
    <DxComboBox Data="@Strings"
        Value="@Value" 
        ValueChanged="@((string s) => ValueChanged())"
        ValueExpression="@(() => Value)">
    </DxComboBox>
    
  • Implement the two-way binding in the EditForm.