Node

  • 2 minutes to read

Nodes correspond to items within the hierarchical data. Nodes are represented by MVCxTreeViewNode objects. A node can have its own child nodes collection available via the MVCxTreeViewNode.Nodes property. These child nodes have their own children, etc.

The parent node for all nodes, displayed within TreeView, is called the root node. This is a special node that isn't displayed. The collection of its child nodes can be accessed via the TreeViewSettings.Nodes property.

TreeViev - Node

The node content can include a check box, an image and a text. The table below lists the main members that affect node content.

Visual element

Content Members

Appearance Members

Check box

TreeViewSettings.AllowCheckNodes,

TreeViewNode.AllowCheck (via MVCxTreeViewNode.AllowCheck)

TreeViewStyles.NodeCheckBox (TreeViewSettings.Styles.NodeCheckBox),

TreeViewStyles.NodeCheckBoxFocused (TreeViewSettings.Styles.NodeCheckBoxFocused),

TreeViewNode.CheckBoxStyle (via MVCxTreeViewNode.CheckBoxStyle),

TreeViewImages.CheckBoxChecked (TreeViewSettings.Images.CheckBoxChecked),

TreeViewImages.CheckBoxGrayed (TreeViewSettings.Images.CheckBoxGrayed),

TreeViewImages.CheckBoxUnchecked (TreeViewSettings.Images.CheckBoxUnchecked)

Image

ImagePropertiesBase.Url (via MVCxTreeViewNode.Image.Url)

TreeViewNode.Image (via MVCxTreeViewNode.Image),

TreeViewNode.ImageStyle (via MVCxTreeViewNode.ImageStyle),

TreeViewImages.NodeImage (TreeViewSettings.Images.NodeImage)

Text

TreeViewNode.Text (via MVCxTreeViewNode.Text)

TreeViewNode.TextStyle (via MVCxTreeViewNode.TextStyle),

MVCxTreeViewNode.SetTextTemplateContent,

TreeViewSettings.SetNodeTextTemplateContent

A node has a set of properties responsible for a node's state. The tables below list the main properties that specify that state.

States Server Members Description
Visible TreeViewNode.Visible (via MVCxTreeViewNode.Visible) Gets or sets a value specifying the current node's visibility.
Enabled TreeViewNode.Enabled (via MVCxTreeViewNode.Enabled) Gets or sets a value that indicates whether the node is enabled.
Checked TreeViewNode.Checked (via MVCxTreeViewNode.Checked) Gets or sets whether the node is checked.
CheckState TreeViewNode.CheckState (via MVCxTreeViewNode.CheckState) Gets a value that specifies the node check state.
Expanded TreeViewNode.Expanded (via MVCxTreeViewNode.Expanded) Gets or sets whether the node is expanded.