DxTreeViewBase.BeforeExpand Event

Fires when a node is about to be expanded and allows you to cancel the action.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.dll

Declaration

[Parameter]
public Action<TreeViewNodeCancelEventArgs> BeforeExpand { get; set; }

Parameters

Type Description
TreeViewNodeCancelEventArgs

Remarks

The BeforeExpand event fires before a node is expanded. The following code sample illustrates how to handle the BeforeExpand event.

<DxTreeView BeforeExpand="@BeforeExpand">
    ...
</DxTreeView>

@code  {
    void BeforeExpand(TreeViewNodeCancelEventArgs e) {
        // your code

        // to cancel the node expanding, set the Cancel property to true
        // e.Cancel = true;
    }
}
See Also