Class TreeViewNodeCollection
TreeViewNodeCollection contains the collection of tree view nodes.
Inheritance
Implements
Namespace: Syncfusion.TreeView.Engine
Assembly: Syncfusion.SfTreeView.XForms.dll
Syntax
public class TreeViewNodeCollection : Collection<TreeViewNode>, IDisposable
Constructors
TreeViewNodeCollection()
Initializes a new instance of the TreeViewNodeCollection class.
Declaration
public TreeViewNodeCollection()
TreeViewNodeCollection(TreeViewNode)
Initializes a new instance of the TreeViewNodeCollection class.
Declaration
public TreeViewNodeCollection(TreeViewNode parentNode)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeViewNode | parentNode | Represents the parent node in tree view collection. |
Fields
ParentNode
Represents the parent TreeViewNode.
Declaration
protected TreeViewNode ParentNode
Field Value
| Type |
|---|
| TreeViewNode |
Methods
ClearItems()
Clears the node collection.
Declaration
protected override void ClearItems()
Dispose()
Disposes all the resources used by the TreeViewNodeCollection class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the TreeViewNodeCollection class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isDisposing | Represents the boolean value for disposing objects. |
GetNode(Object)
Helper method to get the node index based on record.
Declaration
public TreeViewNode GetNode(object record)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | record | Represents the tree view item. |
Returns
| Type | Description |
|---|---|
| TreeViewNode | Return the tree view node. |
IndexOfNode(Object)
Gets the index of the given record.
Declaration
public int IndexOfNode(object record)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | record | Represents the tree view item. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The index of the given item. |
InsertItem(Int32, TreeViewNode)
Inserts the node at specified index.
Declaration
protected override void InsertItem(int index, TreeViewNode node)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Specifies the index at which the node to be inserted. |
| TreeViewNode | node | Sepcifies the TreeViewNode. |
Move(Int32, Int32)
Moves the node at specified index to a new location in the Nodes collection.
Declaration
public void Move(int oldIndex, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | oldIndex | Old index of the node. |
| System.Int32 | index | New index to move the node. |
RemoveItem(Int32)
Removes item at the specific index.
Declaration
protected override void RemoveItem(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Specifies the index of the item to be removed. |
RemoveRange(Int32, Int32)
Removes the given number of row lines from the given index in the LineSizeCollection.
Declaration
public void RemoveRange(int index, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The index to remove the lines. |
| System.Int32 | count | The count. |
SetItem(Int32, TreeViewNode)
Sets the item at the specified index.
Declaration
protected override void SetItem(int index, TreeViewNode item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Specifies the index at which the item to be set. |
| TreeViewNode | item | Specifies the TreeViewNode. |