Skip to main content

AccordionItemCancelEventArgs.Cancel Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.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 following code snippet cancels 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