DxAccordion.ItemClick Event
Fires when a user clicks an Accordion item.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public EventCallback<AccordionItemClickEventArgs> ItemClick { get; set; }
Event Data
The ItemClick event's data class is AccordionItemClickEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
ItemInfo | Returns information about an item related to the event. Inherited from AccordionItemEventArgs. |
MouseEventArgs | The Blazor’s built-in MouseEventArgs event arguments. |
Remarks
Use the DxAccordion.ItemClick
event to react to item clicks. The following code snippet handles the event:
<DxAccordion ItemClick=@OnClick>
<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>
The clicked item: @Item
@code {
string Item { get; set; } = "";
void OnClick(AccordionItemClickEventArgs args) {
Item = args.ItemInfo.Text;
}
}
See Also