Back to Devexpress

How to: Focus a specific node

windowsforms-5683-controls-and-libraries-tree-list-examples-focus-and-selection-how-to-focus-a-specific-node.md

latest529 B
Original Source

How to: Focus a specific node

  • Nov 13, 2018

The following example shows how to move focus to a specific node. To do this, the requried node is assigned to the TreeList.FocusedNode property.

csharp
// Move focus to the first root node.
treeList1.FocusedNode = treeList1.Nodes[0];
vb
' Move focus to the first root node.
TreeList1.FocusedNode = TreeList1.Nodes(0)