Class GridTreeNode
Encapsulates the properties of a row within the TreeGrid.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Controls.Grid
Assembly: Syncfusion.Grid.Wpf.dll
Syntax
public class GridTreeNode : IComparable, ISelectable, IDisposable
Constructors
GridTreeNode(Int32, Object, Boolean, GridTreeNode)
Encapsulates the properties of a row within the TreeGrid.
Declaration
public GridTreeNode(int level, object item, bool expanded, GridTreeNode parentNode)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | level | The indent level of the row. Must be greater than or equal to 0. |
| System.Object | item | The data item associated with the row. |
| System.Boolean | expanded | Indicates whether the row is expanded or not. |
| GridTreeNode | parentNode | The parent GridTreeNode of this GridTreeNode. |
Properties
ChildNodes
Gets or sets the children of this node, if any.
Declaration
public List<GridTreeNode> ChildNodes { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.List<GridTreeNode> |
Expanded
Gets or sets whether the node is expanded.
Declaration
public bool Expanded { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
HasChildNodes
Gets or sets whether this node has child nodes.
Declaration
public bool HasChildNodes { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
IsSelected
Gets whether node is selected. Do not use the setter on this property if you want the grid to respond to your changing of the property.
Declaration
public bool IsSelected { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Remarks
The setter on this property is for internal use only. To change the value of IsSelected from code, you should use the grid.SelectedNodes.SetSelected method. Using this method guarantees the grid will properly respond to the changing of the IsSelected property.
Item
Get or sets the data object associated with this node.
Declaration
public object Item { get; set; }
Property Value
| Type |
|---|
| System.Object |
Level
Gets or sets the indent level for this node.
Declaration
public int Level { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
NodeHeight
Gets or sets the row height for this node.
Declaration
public double NodeHeight { get; set; }
Property Value
| Type |
|---|
| System.Double |
Remarks
If this value in double.NAN, then the default rowheight will be used.
ParentItem
Gets or sets the parent data object associated with this node.
Declaration
public object ParentItem { get; set; }
Property Value
| Type |
|---|
| System.Object |
ParentNode
Gets the parent GridTreeNode of this GridTreeNode.
Declaration
public GridTreeNode ParentNode { get; }
Property Value
| Type |
|---|
| GridTreeNode |
SelectedColumns
Gets the selected columns for a GridTreeControl for use when EnableNodeSelection = false and EnableSelections = true.
Declaration
public List<string> SelectedColumns { get; }
Property Value
| Type |
|---|
| System.Collections.Generic.List<System.String> |
Methods
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type |
|---|
| System.Int32 |
Dispose()
Disposes all the resources used by the GridTreeNode class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the GridTreeNode class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | true to release all the resources. |