DxListBox<TData, TValue>.Value Property
Gets or sets the selected item value.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public TValue Value { get; set; }
Property Value
| Type | Description |
|---|---|
| TValue | The selected item value. |
Remarks
If you allow users to select only one item, you can do the following:
- Use the
Valueproperty to access the List Box’s selected item value from a bound data source. - Handle the ValueChanged event to respond to selection changes.
If the List Box allows users to select multiple items, use the Values property and ValuesChanged event instead.
The Value property can return the following objects:
- The selected item value if the ValueFieldName is specified.
- The selected item if the ValueFieldName property is unspecified. Note that in this case, the List Box searches for a field named
Valuein the data source. An exception occurs in the following situations:- If the found
Valuedata type differs from the bound Value type. - If the data source does not contain a field named
Value.
- If the found
<DxListBox Data="@Staff.DataSource"
@bind-Value="@Value"
TextFieldName="@nameof(Person.Text)"/>
@code{
Person Value;
}

Implements
DevExpress.Blazor.IListBox<TData, TValue>.Value
See Also