DxListBox<TData, TValue>.ShowCheckboxes Property

Specifies whether to display node checkboxes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public bool ShowCheckboxes { get; set; }

Property Value

Type Description
Boolean

true to display node checkboxes; otherwise, false.

Remarks

You can embed checkboxes into List Box nodes to allow users to check/uncheck individual nodes. If the ShowCheckboxes property is set to true, users can click the items or corresponding checkboxes to select the items.

NOTE

The ShowCheckboxes property should only be used if SelectionMode is set to Multiple.

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

@code {
    IEnumerable<Person> Values {
        get => Values;
        set { Values = value; InvokeAsync(StateHasChanged); }
    }
}

ListBox ShowCheckboxes

Run Demo: List Box - Multiple Selection

See Also