Node
- 2 minutes to read
A node visualizes a single data store record. Each node contains data cells used for displaying the record’s values. In group nodes, a data cell that belongs to the categorized column is spanned over the entire node.
A hierarchy of nodes reflects the self-referencing relationship of the persistent data.
A tree list provides different ways to build up the View with nodes:
The TcxDBTreeList control can be populated with nodes programmatically or automatically. To learn how to prepare the control for automatic loading of nodes, refer to the Connecting to Data help topic.
The TcxVirtualTreeList control is populated with nodes programmatically.
For the TcxDBTreeList and TcxTreeList controls, nodes can also be specified manually at design time using the Items Editor.
Along with the data cells, the node also contains the following visual elements (from left to right):
Element | Description |
---|---|
Node Indicator | Informs an end-user about focused and selected nodes. It allows an end-user to focus or select nodes, expand or collapse nodes, and also move nodes in the same nesting level. |
Expand Button | It is used to expand or collapse parent nodes. |
Check Box (Radio Button) | Optional element. It is used to check or uncheck nodes. |
State Image | Optional element. Informs about specific node states. |
Select Image | Optional element. Informs whether the node is selected or not. |
Preview | Optional element. Displays large chunks of non-editable information. |
Drop Indicator | Optional element. Suggests the resulting drop position for a node being dragged, relative to a node under the mouse pointer. |
In code, each node is represented by an instance of one of the following classes:
The base class (TcxTreeListNode).
The class that corresponds to a certain data load mode (TcxUnboundTreeListNode, TcxDBTreeListNode, or TcxVirtualTreeListNode).
The table below lists the main properties that relate to nodes.
Visibility | The node’s Visible property. |
Appearance | The TreeList control’s Styles.ContentEven, Styles.ContentOdd, Styles.UseOddEvenStyles, Styles.Preview, Styles.HotTrack, and Styles.IncSearch properties. To dynamically customize style settings, handle the TreeList control’s Styles.OnGetNodeIndentStyle, Styles.OnGetContentStyle, Styles.OnGetPreviewStyle and Styles.OnGetHotTrackStyle events. |
Custom Draw Event | The TreeList control’s OnCustomDrawIndentCell, OnCustomDrawDataCell and OnCustomDrawPreviewCell events. |
HitTest Information | The TreeList control’s HitTest.HitAtNode property. |
Contents | The node’s Values property. |
Bounds | The node’s DisplayRect method. |