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 |
|
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.
Follow the steps below to enable the Select All functionality:
- Set the SelectionMode property to ListBoxSelectionMode.Multiple to enable multiple selection in the List Box.
- Set the ShowCheckboxes property to
true
. - Set the
ShowSelectAllCheckbox
property totrue
.
@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
- No available items are selected.
Checked
- All available items are selected.
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.
See Also