windowsforms-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-e8cd0cb7.md
Gets the first child node.
Namespace : DevExpress.XtraTreeList.Nodes
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
[Browsable(false)]
public virtual TreeListNode FirstNode { get; }
<Browsable(False)>
Public Overridable ReadOnly Property FirstNode As TreeListNode
| Type | Description |
|---|---|
| TreeListNode |
A TreeListNode object which represents the first child node. null ( Nothing in Visual Basic) if the current node has no child nodes.
|
Each node can have children. The child nodes are contained within their parent’s TreeListNode.Nodes collection. The FirstNode method returns the first element in this collection.
The following code snippets (auto-collected from DevExpress Examples) contain references to the FirstNode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/Form1.cs#L198
if (treeList1.Nodes.Count > 0)
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode;
}
winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/Form1.cs#L186
if (treeList1.Nodes.Count > 0)
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode;
}
winforms-richeditcontrol-common-api/CS/RichEditAPISample/Form1.cs#L460
if(treeList1.Nodes.Count > 0)
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode;
}
word-document-api-examples/CS/Form1.cs#L84
if (treeList1.Nodes.Count > 0)
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode;
RichEditExample example = treeList1.GetDataRecordByNode(treeList1.FocusedNode) as RichEditExample;
spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/Form1.cs#L144
if (treeList1.Nodes.Count > 0)
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode;
}
winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/Form1.vb#L191
If treeList1.Nodes.Count > 0 Then
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode
End If
winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/Form1.vb#L177
If treeList1.Nodes.Count > 0 Then
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode
End If
winforms-richeditcontrol-common-api/VB/RichEditAPISample/Form1.vb#L455
If treeList1.Nodes.Count > 0 Then
treeList1.FocusedNode = treeList1.MoveFirst().FirstNode
End If
word-document-api-examples/VB/Form1.vb#L80
treeList1.ExpandAll()
If treeList1.Nodes.Count > 0 Then treeList1.FocusedNode = treeList1.MoveFirst().FirstNode
Dim example As RichEditExample = TryCast(treeList1.GetDataRecordByNode(treeList1.FocusedNode), RichEditExample)
spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/Form1.vb#L128
treeList1.ExpandAll()
If treeList1.Nodes.Count > 0 Then treeList1.FocusedNode = treeList1.MoveFirst().FirstNode
End Sub
See Also