Class TreeGridHelper
Provides helper methods for the SfTreeGrid control.
Inherited Members
Namespace: Syncfusion.Maui.TreeGrid
Assembly: Syncfusion.Maui.TreeGrid.dll
Syntax
public static class TreeGridHelper
Methods
GetCellValue(SfTreeGrid?, object?, string?)
Gets the cell value for the specified record data and column name in the SfTreeGrid.
Declaration
public static object? GetCellValue(this SfTreeGrid? treeGrid, object? recordData, string? columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid | |
| object | recordData | |
| string | columnName |
Returns
| Type |
|---|
| object |
GetHeaderExtent(SfTreeGrid)
Gets the total height of the header area, including the column header row and all the stacked header rows.
Declaration
public static double GetHeaderExtent(this SfTreeGrid treeGrid)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid | The tree grid from which to retrieve the header extent. |
Returns
| Type | Description |
|---|---|
| double | The total header height. |
GetRowHeight(SfTreeGrid, int, bool, List<string>?)
Gets the row height of the specified row index.
Declaration
public static double GetRowHeight(this SfTreeGrid treeGrid, int rowIndex, bool canIncludeHiddenColumns = false, List<string>? excludedColumns = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid | The SfTreeGrid in which the row height is to be obtained. |
| int | rowIndex | The index of the row, whose height is to be obtained. |
| bool | canIncludeHiddenColumns | Is an optional parameter that provides an option to exclude certain column and to decide whether to consider hidden columns when calculating the height. |
| List<string> | excludedColumns | Is an optional parameter that provides an option to exclude certain column and to decide whether to consider excluded columns when calculating the height. |
Returns
| Type | Description |
|---|---|
| double | The row height of the specified row index in the given SfTreeGrid. |
PointToRowColumnIndex(SfTreeGrid, Point, bool)
Gets the row column index of the specified point in the given SfTreeGrid.
Declaration
public static RowColumnIndex PointToRowColumnIndex(this SfTreeGrid treeGrid, Point point, bool allowOutsideLines = false)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid | The SfTreeGrid in which the RowColumnIndex of the given Microsoft.Maui.Graphics.Point is to be obtained. |
| Point | point | The Microsoft.Maui.Graphics.Point in the SfTreeGrid whose RowColumnIndex is to be obtained. |
| bool | allowOutsideLines | Need to pass allowOutSideLines as true, to return row column index while reordering the columns. |
Returns
| Type | Description |
|---|---|
| RowColumnIndex | The row column index corresponding to the given point. |
Refresh(SfTreeGrid)
Refreshes the SfTreeGrid control, updating its view and visible columns.
Declaration
public static void Refresh(this SfTreeGrid treeGrid)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid |
RefreshColumns(SfTreeGrid)
Refreshes the columns of the SfTreeGrid control, updating their visibility and layout.
Declaration
public static void RefreshColumns(this SfTreeGrid treeGrid)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid |
RowColumnIndexToPoint(SfTreeGrid, RowColumnIndex)
Gets the point for the specified row column index in the given SfTreeGrid.
Declaration
public static Point RowColumnIndexToPoint(this SfTreeGrid treeGrid, RowColumnIndex rowColumnIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid | |
| RowColumnIndex | rowColumnIndex |
Returns
| Type | Description |
|---|---|
| Point | The point corresponding to the given row column index. |