Skip to main content

DxAccordion.SelectionMode Property

Specifies the selection mode.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(NavigationSelectionMode.None)]
[Parameter]
public NavigationSelectionMode SelectionMode { get; set; }

Property Value

Type Default Description
NavigationSelectionMode None

A NavigationSelectionMode enumeration value.

Available values:

Name Description
None

Users cannot select items.

Single

Users can select one item.

Remarks

Set the SelectionMode property value to Single to activate selection functionality in the Accordion component:

<DxAccordion SelectionMode="NavigationSelectionMode.Single">
    <Items>
        <DxAccordionItem Text="Shapes">
            <Items>
                <DxAccordionItem Text="Circle" />
                <DxAccordionItem Text="Square" />
            </Items>
        </DxAccordionItem>
        <DxAccordionItem Text="Templates" />
    </Items>
</DxAccordion>

Accordion with single selection

If you want the item to expand on selection, set the AccordionExpandCollapseAction property to HeaderClick.

Use the SelectItem method to select an item from code.

Run Demo: Accordion - Select Items

See Also