BootstrapTreeViewNode.Nodes Property
Gets the collection of child nodes within the particular node and provides indexed access to them.
Namespace: DevExpress.Web.Bootstrap
Assembly: DevExpress.Web.Bootstrap.v24.2.dll
NuGet Package: DevExpress.Web.Bootstrap
#Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public BootstrapTreeViewNodeCollection Nodes { get; }
#Property Value
Type | Description |
---|---|
Bootstrap |
A Bootstrap |
#Remarks
Use the Nodes property to access the collection of child nodes of the current node. This collection contains only the nodes at the next hierarchy level. To access nodes further down the Tree View, use the Nodes property of a child node. If the Nodes property is the null reference (Nothing in Visual Basic), the current node does not have any child nodes. A particular node can be accessed using index notation.
Note that the nodes of an Tree View’s root node can be accessed via the BootstrapTreeView.Nodes property of the BootstrapTreeView control.
#Example
This example demonstrates the basic functionality of the Tree View control.
- Initialize a new instance of the BootstrapTreeView class.
- Add required nodes (BootstrapTreeViewNode objects) to the BootstrapTreeView.Nodes collection.
- Use the TreeViewNode.Text to specify the text displayed within the node content.
The image below shows the result:
<dx:BootstrapTreeView runat="server">
<Nodes>
<dx:BootstrapTreeViewNode Text="Home" Expanded="true">
<Nodes>
<dx:BootstrapTreeViewNode Text="News">
<Nodes>
<dx:BootstrapTreeViewNode Text="For Developers">
</dx:BootstrapTreeViewNode>
<dx:BootstrapTreeViewNode Text="Website news">
</dx:BootstrapTreeViewNode>
</Nodes>
</dx:BootstrapTreeViewNode>
<dx:BootstrapTreeViewNode Text="Our Mission">
</dx:BootstrapTreeViewNode>
</Nodes>
</dx:BootstrapTreeViewNode>
...
</Nodes>
</dx:BootstrapTreeView>