Skip to main content

DxAccordion.ExpandToItem(Func<IAccordionItemInfo, Boolean>) Method

Expands items down to the specified item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public void ExpandToItem(
    Func<IAccordionItemInfo, bool> predicate
)

Parameters

Name Type Description
predicate Func<IAccordionItemInfo, Boolean>

A method delegate that specifies the item.

Remarks

The following example expands to the Address item:

<DxButton Click=OnClick>Expand items</DxButton>

<DxAccordion @ref=Accordion>
    <Items>
        <DxAccordionItem Text="Nancy Davolio">
            <Items>
                <DxAccordionItem Text="Personal Information">
                    <Items>
                        <DxAccordionItem Text="Address"/>
                    </Items>
                </DxAccordionItem>
            </Items>
        </DxAccordionItem>
    </Items>
</DxAccordion>

@code {
    DxAccordion Accordion;
    void OnClick() {
        Accordion.ExpandToItem(x => x.Text == "Address");
    }
}

Accordion: Expand to the specified item

See Also