Class TreeGridHelper
Inheritance
Namespace: Syncfusion.UI.Xaml.TreeGrid.Helpers
Assembly: Syncfusion.SfGrid.UWP.dll
Syntax
public static class TreeGridHelper : Object
Methods
AddNode(SfTreeGrid, TreeNode, Object)
Add the data to the child collection of particular tree node.
Declaration
public static void AddNode(this SfTreeGrid treeGrid, TreeNode node, object data)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | treeGrid. |
TreeNode | node | The parent node. this is null if root node needs to be added. |
System.Object | data | the data. |
Remarks
This is applicable only when you use the RequestTreeItems event to populate the treegrid.
GetGridModel(SfTreeGrid)
Gets the TreeGridModel of the SfTreeGrid control.
Declaration
public static TreeGridModel GetGridModel(this SfTreeGrid treeGrid)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid. |
Returns
Type | Description |
---|---|
TreeGridModel | The TreeGridModel of the SfTreeGrid control. |
GetTreeGridRowGenerator(SfTreeGrid)
Gets the TreeGridRowGenerator of the SfTreeGrid control.
Declaration
public static TreeGridRowGenerator GetTreeGridRowGenerator(this SfTreeGrid treeGrid)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid. |
Returns
Type | Description |
---|---|
TreeGridRowGenerator | The TreeGridRowGenerator of the SfTreeGrid control. |
GetTreePanel(SfTreeGrid)
Gets the TreeGridPanel of SfTreeGrid.
Declaration
public static TreeGridPanel GetTreePanel(this SfTreeGrid treeGrid)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid. |
Returns
Type | Description |
---|---|
TreeGridPanel | The TreeGridPanel. |
Examples
var treePanel = this.treeGrid.GetTreePanel();
GetValidationHelper(SfTreeGrid)
Gets the TreeGridValidationHelper of SfTreeGrid.
Declaration
public static TreeGridValidationHelper GetValidationHelper(this SfTreeGrid treeGrid)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid. |
Returns
Type | Description |
---|---|
TreeGridValidationHelper |
Examples
var validationHelper = this.treeGrid.GetValidationHelper();
InsertNode(SfTreeGrid, TreeNode, Object, Int32)
Insert the data into the child collection of particular tree node at the specified index.
Declaration
public static void InsertNode(this SfTreeGrid treeGrid, TreeNode node, object data, int index)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | |
TreeNode | node | The parent node. this is null if root node needs to be inserted. |
System.Object | data | the data. |
System.Int32 | index | the index. |
Remarks
This is applicable only when you use the RequestTreeItems event to populate the treegrid.
MoveNode(SfTreeGrid, TreeNode, Int32, Int32)
Moves the child node from an index to the another index in child nodes of particular tree node.
Declaration
public static void MoveNode(this SfTreeGrid treeGrid, TreeNode node, int oldIndex, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | treeGrid. |
TreeNode | node | The parent node. this is null if root node needs to be moved. |
System.Int32 | oldIndex | the oldIndex. |
System.Int32 | newIndex | the newIndex. |
Remarks
This is applicable only when you use the RequestTreeItems event to populate the treegrid.
RefreshColumns(SfTreeGrid)
Refreshes the column count, width in SfTreeGrid.
Declaration
public static void RefreshColumns(this SfTreeGrid treeGrid)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid. |
RemoveNode(SfTreeGrid, TreeNode, Object)
Remove the data from the child collection of particular tree node.
Declaration
public static void RemoveNode(this SfTreeGrid treeGrid, TreeNode node, object data)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | treeGrid. |
TreeNode | node | The parent node. this is null if root node needs to be removed. |
System.Object | data | the data. |
Remarks
This is applicable only when you use the RequestTreeItems event to populate the treegrid.
ReplaceNode(SfTreeGrid, TreeNode, Object, Int32)
Replaces the node at specified index with the data in child nodes of the particular tree node.
Declaration
public static void ReplaceNode(this SfTreeGrid treeGrid, TreeNode node, object data, int index)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | treeGrid. |
TreeNode | node | The parent node. this is null if root node needs to be replaced. |
System.Object | data | the data. |
System.Int32 | index | the index. |
Remarks
This is applicable only when you use the RequestTreeItems event to populate the treegrid.
ResetNodes(SfTreeGrid, TreeNode)
Clear child nodes of the particular node.
Declaration
public static void ResetNodes(this SfTreeGrid treeGrid, TreeNode node)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid |
TreeNode | node | The parent node. this is null if root nodes need to be cleared. |
Remarks
This is applicable only when you use the RequestTreeItems event to populate the treegrid.
UpdateDataRow(SfTreeGrid, Int32)
Updates the data row in the given row index.
Declaration
public static void UpdateDataRow(this SfTreeGrid treeGrid, int index)
Parameters
Type | Name | Description |
---|---|---|
SfTreeGrid | treeGrid | The SfTreeGrid. |
System.Int32 | index | Specifies the row index to update the data row in view. |
Examples
this.treeGrid.UpdateDataRow(1);