OrgNodeCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Owns ordered hierarchy nodes, enforcing unique identities and acyclic parent relationships.
- C#
- VB.NET
public class OrgNodeCollection : Collection<OrgNode>
Public Class OrgNodeCollection
Inherits Collection(Of OrgNode)
Each node belongs to at most one collection. Siblings and roots follow collection order. Children can be added before their parents. Removing a parent leaves its children as roots.
Example:
chart.Nodes.Add(new OrgNode { Id = "team", Text = "Operations" });
chart.Nodes.Add(new OrgNode { ParentId = "team", Text = "Support" });
Constructors
OrgNodeCollection()
Initializes a new instance of OrgNodeCollection.
Methods
ClearItems()
Removes all nodes and releases their ownership.
InsertItem(index, item)
Validates and inserts an unowned node.
RemoveItem(index)
Removes a node and releases its ownership without removing descendants.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | Removal index. |
SetItem(index, item)
Replaces an owned node after validating the resulting hierarchy.