Skip to main content
All docs
V26.1
  • TreeViewControl.FocusedRowHandle Property

    Gets or sets the focused node handle. This is a dependency property.

    Namespace: DevExpress.Xpf.Grid

    Assembly: DevExpress.Xpf.Grid.v26.1.dll

    Declaration

    [Browsable(false)]
    public int FocusedRowHandle { get; set; }

    Property Value

    Type Description
    Int32

    An integer value that specifies the focused node handle.

    Remarks

    Use the FocusedRowHandle property to get or set the focused node handle in code. If the specified node is outside the control’s client area, the TreeViewControl automatically scrolls content to display the focused node.

    Example: Focus a Node with a Specific Handle

    The following example focuses a node with the handle value of 5:

    <dx:ThemedWindow x:Class="TreeViewControlApp.MainWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                     xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                     Title="TreeViewControl Demo" Height="450" Width="600">
            <dxg:TreeViewControl x:Name="tree"
                                 ChildNodesPath="Employees"
                                 TreeViewFieldName="Name"
                                 FocusedRowHandle="5"/>
    </dx:ThemedWindow>
    
    See Also