Class TreeGridColumnSizer
Inheritance
Implements
Namespace: Syncfusion.Maui.TreeGrid
Assembly: Syncfusion.Maui.TreeGrid.dll
Syntax
public class TreeGridColumnSizer : Object, IDisposable
Constructors
TreeGridColumnSizer()
Declaration
public TreeGridColumnSizer()
Methods
Dispose()
Declaration
public void Dispose()
GetActualWidth(TreeGridColumn, Double)
Sets the width of the remaining columns based on their AutoWidth property.
Declaration
public double GetActualWidth(TreeGridColumn column, double calculatedWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column | |
| System.Double | calculatedWidth |
Returns
| Type |
|---|
| System.Double |
GetColumnAutoSizeWidth(TreeGridColumn)
Declaration
protected virtual double GetColumnAutoSizeWidth(TreeGridColumn column)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column |
Returns
| Type |
|---|
| System.Double |
GetColumnToFill()
Gets the column that will fill the remaining viewport width in the SfTreeGrid.
Declaration
protected virtual TreeGridColumn GetColumnToFill()
Returns
| Type | Description |
|---|---|
| TreeGridColumn | The column to fill, or null if no such column exists. |
OnColumnPropertyChanged(TreeGridColumn, String)
Represents the method that will handle the property changes of TreeGridColumn.
Declaration
protected virtual void OnColumnPropertyChanged(TreeGridColumn column, string propertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column | A TreeGridColumn object. |
| System.String | propertyName | The property name. |
OnComputeCellHeight(TreeGridColumn, Object)
Calculates the height of the data row's cells. You can override this method to perform the custom calculation for height.
Declaration
protected virtual double OnComputeCellHeight(TreeGridColumn column, object cellValue)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column | The Current Column |
| System.Object | cellValue | The value of the current grid cell. |
Returns
| Type |
|---|
| System.Double |
OnComputeCellWidth(TreeGridColumn, String)
Measures and returns the text width based on the cell value.
Declaration
protected virtual double OnComputeCellWidth(TreeGridColumn column, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column | current column. |
| System.String | text | current column text. |
Returns
| Type | Description |
|---|---|
| System.Double | Returns the text width based on the cell value. |
OnComputeHeaderCellHeight(String, TreeGridColumn)
Calculates the height of the header cells. You can override this method to perform the custom calculation for height.
Declaration
protected virtual double OnComputeHeaderCellHeight(string cellValue, TreeGridColumn column)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | cellValue | The value of the HeaderCell |
| TreeGridColumn | column | The current column. |
Returns
| Type |
|---|
| System.Double |
OnComputeHeaderCellWidth(String, TreeGridColumn)
Calculates the width of the header cells. You can override this method to perform the custom calculation for width.
Declaration
protected virtual double OnComputeHeaderCellWidth(string cellValue, TreeGridColumn column = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | cellValue | Value of the header cell. |
| TreeGridColumn | column | The current column. |
Returns
| Type | Description |
|---|---|
| System.Double | Returns the width required to auto-fit the given column based on its header content. |
Refresh(Boolean)
Refreshes the GridColumns in the view.
Declaration
public void Refresh(bool needsLayout = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | needsLayout | A boolean value specifying whether layout is needed. |
ResetAutoWidth(TreeGridColumn)
Resets the AutoWidth for the specified column.
Declaration
public void ResetAutoWidth(TreeGridColumn column)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column | The column to reset. |
SetAutoWidth(TreeGridColumn, Double)
Sets the measured cell width to the given column.
Declaration
public void SetAutoWidth(TreeGridColumn column, double width)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridColumn | column | |
| System.Double | width |
SetFillWidthForColumns(Double, IEnumerable<TreeGridColumn>)
Calculates the width of the grid cell.
Declaration
protected virtual void SetFillWidthForColumns(double columnsWidth, IEnumerable<TreeGridColumn> columns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | columnsWidth | |
| System.Collections.Generic.IEnumerable<TreeGridColumn> | columns |