Skip to main content

AccordionItemCancelEventArgs.Cancel Property

Specifies whether the action that raised the event should be canceled.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public bool Cancel { get; set; }

Property Value

Type Description
Boolean

true if the action should be canceled; otherwise, false.

Remarks

The code sample below demonstrates how to cancel the collapse action for root-level nodes:

<DxAccordion BeforeCollapse="@BeforeCollapse">
    @* ... *@
</DxAccordion>

@code  {
    void BeforeCollapse(AccordionItemCancelEventArgs args) {
        if (args.ItemInfo.Level == 0) args.Cancel = true;
    }
}
See Also