ListBoxSelectionMode Enum

Lists the values that specify the selection behavior for a list editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

public enum ListBoxSelectionMode

Members

Name Description
Single

Users can only select one List Box item at once.

Multiple

Users can select multiple items in List Box.

None

Users cannot select items in List Box.

Related API Members

The following properties accept/return ListBoxSelectionMode values:

Remarks

<DxListBox Data="@Staff.DataSource"
           TextFieldName="@nameof(Person.Text)"
           SelectionMode="ListBoxSelectionMode.Multiple"
           ShowCheckboxes="@ShowCheckboxes"
           @bind-Values="@Values">
</DxListBox>

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

    bool showCheckboxes = true;
    bool ShowCheckboxes { 
        get => showCheckboxes;
        set { showCheckboxes = value; InvokeAsync(StateHasChanged); }
    }
}

ListBox Multiple Selection

Run Demo: List Box - Multiple Selection

See Also