Class TreeGridColumn
Serves as the base class for columns used in a tree grid control, providing common functionality and properties for column definitions.
Inheritance
Implements
Namespace: Syncfusion.Maui.TreeGrid
Assembly: Syncfusion.Maui.TreeGrid.dll
Syntax
public abstract class TreeGridColumn : BindableObject, IDisposable
Remarks
Inherit from TreeGridColumn to implement custom column types for tree grid controls. This class enables the creation of columns that can display hierarchical data within a grid structure.
Constructors
TreeGridColumn()
Declaration
protected TreeGridColumn()
Fields
ActualWidthProperty
Identifies the ActualWidth Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty ActualWidthProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
AllowSortingProperty
Identifies the AllowSorting Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty AllowSortingProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
CellPaddingProperty
Identifies the CellPadding Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CellPaddingProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
CellStyleProperty
Identifies the CellStyle Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CellStyleProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
CellTextAlignmentProperty
Identifies the CellTextAlignment Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CellTextAlignmentProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
ColumnWidthModeProperty
Identifies the ColumnWidthMode Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty ColumnWidthModeProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
CultureInfoProperty
Bindable property for CultureInfo
Declaration
public static readonly BindableProperty CultureInfoProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
FormatProperty
Identifies the Format Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty FormatProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
HeaderPaddingProperty
Identifies the HeaderPadding Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderPaddingProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
HeaderStyleProperty
Identifies the CellStyle Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderStyleProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
HeaderTemplateProperty
Identifies the HeaderTemplate Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderTemplateProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
HeaderTextAlignmentProperty
Identifies the HeaderTextAlignment Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderTextAlignmentProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
HeaderTextProperty
Identifies the HeaderText Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderTextProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
MappingNameProperty
Identifies the MappingName Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty MappingNameProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
MaximumWidthProperty
Identifies the MaximumWidth Microsoft.Maui.Controls.BindableProperty. property.
Declaration
public static readonly BindableProperty MaximumWidthProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
MinimumWidthProperty
Identifies the MinimumWidth Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty MinimumWidthProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
VisibleProperty
Identifies the IsHidden Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty VisibleProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
WidthProperty
Identifies the Width Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty WidthProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
Properties
ActualWidth
Gets the actual display width of the column when auto-fitted.
Declaration
public double ActualWidth { get; }
Property Value
| Type |
|---|
| System.Double |
AllowSorting
Gets or sets a value indicating whether sorting is allowed for this column.
Declaration
public bool AllowSorting { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
CellPadding
Gets or sets the inner padding of the cell.
Declaration
public Thickness CellPadding { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Thickness |
CellStyle
Gets or sets the style that is used to render cells in the column.
Declaration
public Style CellStyle { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.Style |
CellTextAlignment
Gets or sets the text alignment for cells in the column.
Declaration
public TextAlignment CellTextAlignment { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.TextAlignment |
CellType
Gets or sets the cell renderer type for this column.
Declaration
public string CellType { get; }
Property Value
| Type |
|---|
| System.String |
ColumnWidthMode
Gets or sets the column width mode for automatic width calculations.
Declaration
public TreeGridColumnWidthMode ColumnWidthMode { get; set; }
Property Value
| Type |
|---|
| TreeGridColumnWidthMode |
CultureInfo
Gets or sets the culture used for formatting cell content in the column.
Declaration
public CultureInfo CultureInfo { get; set; }
Property Value
| Type |
|---|
| System.Globalization.CultureInfo |
Remarks
Assign a FormatString to this property based on the data type to format the cell values appropriately.
DisplayBinding
Gets or sets the binding that associates the column with a property in the data source to display in cells.
Declaration
public Binding DisplayBinding { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.Binding |
Format
Gets or sets the format string applied to the content of cells in the column.
Declaration
public string Format { get; set; }
Property Value
| Type |
|---|
| System.String |
HeaderPadding
Gets or sets the inner padding of the column header.
Declaration
public Thickness HeaderPadding { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Thickness |
HeaderStyle
Gets or sets the style that is used to render the header cell.
Declaration
public Style HeaderStyle { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.Style |
HeaderTemplate
Gets or sets the template used to display the column header.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.DataTemplate |
Remarks
You can use a Microsoft.Maui.Controls.DataTemplateSelector to choose different templates based on header cell state.
HeaderText
Gets or sets the text to be displayed in the column header.
Declaration
public string HeaderText { get; set; }
Property Value
| Type |
|---|
| System.String |
HeaderTextAlignment
Gets or sets the text alignment for the column header.
Declaration
public TextAlignment HeaderTextAlignment { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.TextAlignment |
MappingName
Gets or sets the mapping name that associates the column with a property in the bound data source.
Declaration
public string MappingName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The mapping name that associates the column with a property in the data source. |
MaximumWidth
Gets or sets the maximum width of the column.
Declaration
public double MaximumWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
MinimumWidth
Gets or sets the minimum width of the column.
Declaration
public double MinimumWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
ValueBinding
Gets or sets the value binding that associates the column with a property in the data source.
Declaration
public Binding ValueBinding { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.Binding |
Remarks
The value of the property in the underlying model object bound to the value binding will be the content of the grid cell in edit mode.
Visible
Gets or sets a value indicating whether the column is visible.
Declaration
public bool Visible { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Width
Gets or sets the width of the column.
Declaration
public double Width { get; set; }
Property Value
| Type |
|---|
| System.Double |
Methods
Dispose()
Perform final clean up before it is released from memory.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
GetFormattedValue(Object)
Gets the formatted value for the given cell value.
Declaration
public virtual object GetFormattedValue(object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The cell value to be formatted. |
Returns
| Type | Description |
|---|---|
| System.Object | The formatted value. |