Skip to main content
All docs
V25.1
  • DxListBox<TData, TValue>.ShowSelectAllCheckbox Property

    Specifies whether to display the Select All checkbox.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Property Value

    Type Description
    Boolean

    true to display the Select All checkbox; otherwise, false.

    Remarks

    You can embed the Select All checkbox into the List Box. This checkbox allows users to select/deselect all available items. It does not affect items hidden by a filter or disabled items.

    ListBox ShowCheckboxes

    Follow the steps below to enable the Select All functionality:

    1. Set the SelectionMode property to ListBoxSelectionMode.Multiple to enable multiple selection in the List Box.
    2. Set the ShowCheckboxes property to true.
    3. Set the ShowSelectAllCheckbox property to true.
    @using StaffData
    
    <DxListBox Data="@Staff.DataSource"
               TextFieldName="@nameof(Person.Text)"
               SelectionMode="ListBoxSelectionMode.Multiple"
               ShowCheckboxes="true"
               ShowSelectAllCheckbox="true"
               @bind-Values="@Values">
    </DxListBox>
    
    @code {
        IEnumerable<Person> Values { get; set; }
    }
    

    The Select All checkbox can have 3 states:

    Unchecked state Unchecked
    No available items are selected.
    Checked state Checked
    All available items are selected.
    Indeterminate state Indeterminate
    The checkbox has this state in the following cases:
    • Several available items are selected.
    • You bind the List Box to a custom data and activate virtual scrolling (ListRenderMode is set to Virtual). In this case, the Select All checkbox stays in the Indeterminate state. When a user clicks the checkbox, a pop-up displays two options: Select All and Deselect All.

    Run Demo: List Box - Multiple Selection

    See Also