Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

Returns information about the specified item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public IAccordionItemInfo GetItemInfo(
    Func<IAccordionItemInfo, bool> predicate
)

#Parameters

Name Type Description
predicate Func<IAccordionItemInfo, Boolean>

The specified item.

#Returns

Type Description
IAccordionItemInfo

Information about the found item.

#Remarks

Use the GetItemInfo method to obtain information about a specified item. If the Accordion component contains several items that satisfy the condition, the GetItemInfo method returns information about the first item.

The following code snippet returns the item’s information based on the Text property value:

razor
<DxButton Click=@OnClick>Get info</DxButton>

<DxAccordion @ref=Accordion>
    <Items>
        <DxAccordionItem Text="Grid" />
        <DxAccordionItem Text="Navigation and Layout">
            <Items>
                <DxAccordionItem Text="Accordion" />
                <DxAccordionItem Text="Stack Layout" />
            </Items>
        </DxAccordionItem>
        <DxAccordionItem Text="Data Editors" />
        <DxAccordionItem Text="Scheduler" />
    </Items>
</DxAccordion>

@code {
    DxAccordion Accordion;
    void OnClick() {
        var Item = Accordion.GetItemInfo(x => x.Text == "Navigation and Layout");
    }
}
See Also