TreeViewNodeCancelEventArgs.Cancel Property
Specifies whether the action that raised the event should be canceled.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true, if the action that raised the event should be canceled; otherwise, false. |
Remarks
The code sample below demonstrates how to prohibit root-level nodes from collapsing.
<DxTreeView BeforeCollapse="@BeforeCollapse">
...
</DxTreeView>
@code {
void BeforeCollapse(TreeViewNodeCancelEventArgs e) {
if (e.NodeInfo.Level == 0) e.Cancel = true;
}
}
See Also