ListBoxSelectionMode Enum

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public enum ListBoxSelectionMode

Members

Name Description
Multiple

Users can select multiple items in List Box.

None

Users cannot select items in List Box.

Single

Users can only select one List Box item at once.

Remarks

The values of this enumeration are used to specify the SelectionMode property.

<DxListBox Data="@Persons.DataSource"
           TextFieldName="Text"
           SelectionMode="ListBoxSelectionMode.Multiple"
           ShowCheckboxes="@ShowCheckboxes"
           @bind-SelectedItems="@SelectedItems">
</DxListBox>

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

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

Blazor_ListBox_Multiple_Selection

See Also