Class DataGridColumn
Represents the base class for the different column types of the SfDataGrid control.
Inheritance
Implements
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public abstract class DataGridColumn : BindableObject, IDisposable
Constructors
DataGridColumn()
Initializes a new instance of the DataGridColumn class.
Declaration
public DataGridColumn()
Fields
ActualWidthProperty
Identifies the ActualWidth Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty ActualWidthProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
CacheDisplayBindingProperty
Identifies the CacheDisplayBindingMicrosoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CacheDisplayBindingProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
CellPaddingProperty
Identifies the CellPadding Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CellPaddingProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
CellStyleProperty
Identifies the CellStyle Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CellStyleProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
ColumnWidthModeProperty
Identifies the ColumnWidthMode Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty ColumnWidthModeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
FormatProperty
Identifies the Format Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty FormatProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
HeaderStyleProperty
Identifies the CellStyle Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderStyleProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
HeaderTextProperty
Identifies the HeaderText Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty HeaderTextProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
SortModeProperty
Identifies the SortModeMicrosoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty SortModeProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
VisibleProperty
Identifies the IsHidden Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty VisibleProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
Properties
ActualWidth
The actual display width of the column when auto fitted.
Declaration
public double ActualWidth { get; }
Property Value
Type | Description |
---|---|
System.Double |
AllowSorting
Gets or sets a value indicating whether a column can be sorted.
Declaration
public bool AllowSorting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
See Also
CellPadding
Gets or sets the inner padding of the cell.
Declaration
public Thickness CellPadding { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Thickness |
CellStyle
Gets or sets the style that is used to render the cells in a column.
Declaration
public Style CellStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Style |
CellTextAlignment
Gets or sets the alignment for the rows.
Declaration
public TextAlignment CellTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.TextAlignment |
CellType
Gets or sets the cell type of the DataGridColumn.
Declaration
public string CellType { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
ColumnWidthMode
Gets or sets the value that indicates how the column width is determined.
Declaration
public ColumnWidthMode ColumnWidthMode { get; set; }
Property Value
Type | Description |
---|---|
ColumnWidthMode | One of the ColumnWidthMode enumeration that adjust the column width. The default value is None. |
DisplayBinding
Gets or sets the binding that associates the column with a property in the data source to display in cells.
Declaration
public BindingBase DisplayBinding { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindingBase |
Format
Gets or sets a value that indicates the format applied for the content of record cells in the column.
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HeaderPadding
Gets or sets the inner padding of the column header.
Declaration
public Thickness HeaderPadding { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Thickness |
HeaderStyle
Gets or sets the style that is used to render the header cell in a column.
Declaration
public Style HeaderStyle { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.Style |
HeaderTemplate
Gets or sets the template used to display the header of the current column.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.Maui.Controls.DataTemplate |
Remarks
You can directly assign the Microsoft.Maui.Controls.DataTemplateSelector to choose the different Microsoft.Maui.Controls.DataTemplate based on header cells.
HeaderText
Gets or sets the text to be displayed in header.
Declaration
public string HeaderText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HeaderTextAlignment
Gets or sets the alignment for the column header.
Declaration
public TextAlignment HeaderTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
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 a column.
Declaration
public double MaximumWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
MinimumWidth
Gets or sets the minimum width of a column.
Declaration
public double MinimumWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
SortMode
Gets or sets a value that decides whether sorting calculation is processed based on display value in case of indexer and complex properties or default value in case of CLR properties.
Declaration
public DataReflectionMode SortMode { get; set; }
Property Value
Type | Description |
---|---|
DataReflectionMode | The DataReflectionMode that decides whether sorting calculation is processed based on display value or default value. The default value is Default. |
Visible
Gets or sets a value indicating whether a column should be visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Width
Gets or sets the width of a column.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
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 Content of a record cell in the column based on the Format and System.Globalization.CultureInfo of the column.
Declaration
public virtual object GetFormattedValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The actual value of the record cell in the column. |
Returns
Type | Description |
---|---|
System.Object | The formatted value based on the Format and System.Globalization.CultureInfo properties of the column. |
SetConverterForDisplayBinding()
Sets the converter for the DisplayBinding of column.
Declaration
protected virtual void SetConverterForDisplayBinding()
Remarks
You can override this method to specify the converter for DisplayBinding.