Back to Devexpress

TreeViewNodeEventArgs.CausedByAPI Property

blazor-devexpress-dot-blazor-dot-treeviewnodeeventargs-b9555bbf.md

latest1.3 KB
Original Source

TreeViewNodeEventArgs.CausedByAPI Property

OBSOLETE

This property is obsolete now. Use the Reason property instead.

Specifies whether an event was triggered by a user action or programmatically.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Browsable(false)]
[Obsolete("This property is obsolete now. Use the Reason property instead.")]
public bool CausedByAPI { get; }

Property Value

TypeDescription
Boolean

true, if an event was triggered programmatically; otherwise, false.

|

Remarks

razor
<DxTreeView @ref="@treeView" BeforeExpand="@BeforeExpand" ...> 
    ... 
</DxTreeView> 

@code { 
    DxTreeView treeView; 
    protected void BeforeExpand(TreeViewNodeCancelEventArgs e) { 
        if (!e.CausedByAPI) 
            treeView.CollapseAll(); 
    } 
}

See Also

TreeViewNodeEventArgs Class

TreeViewNodeEventArgs Members

DevExpress.Blazor Namespace