TreeViewNodeEventArgs.CausedByAPI Property
Specifies whether an event was triggered by a user action or programmatically.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public bool CausedByAPI { get; }
Property Value
Type | Description |
---|---|
Boolean | true, if an event was triggered programmatically; otherwise, false. |
Remarks
<DxTreeView @ref="@treeView" BeforeExpand="@BeforeExpand" ...>
...
</DxTreeView>
@code {
DxTreeView treeView;
protected void BeforeExpand(TreeViewNodeCancelEventArgs e) {
if (!e.CausedByAPI)
treeView.CollapseAll();
}
}
See Also