Class DataGridColumn
Defines an abstraction of a table column that is used to visualize data within a RadDataGrid component. A column generally represents a Property within the underlying ViewModel.
Inheritance
Namespace: Telerik.Maui.Controls.DataGrid
Assembly: Telerik.Maui.Controls.dll
Syntax
public abstract class DataGridColumn : BindableObject, IDataDescriptorPeer, IDataGridColumnDefinition
Constructors
DataGridColumn()
Fields
ActualWidthProperty
Identifies the ActualWidth property.
Declaration
public static readonly BindableProperty ActualWidthProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CanUserEditProperty
Identifies the CanUserEdit property.
Declaration
public static readonly BindableProperty CanUserEditProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CanUserFilterProperty
Identifies the CanUserFilter property.
Declaration
public static readonly BindableProperty CanUserFilterProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CanUserGroupProperty
Identifies the CanUserGroup property.
Declaration
public static readonly BindableProperty CanUserGroupProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CanUserReorderProperty
Identifies the CanUserReorder property.
Declaration
public static readonly BindableProperty CanUserReorderProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CanUserSortProperty
Identifies the CanUserSort property.
Declaration
public static readonly BindableProperty CanUserSortProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CellContentTemplateProperty
Identifies the CellContentTemplate property.
Declaration
public static readonly BindableProperty CellContentTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CellContentTemplateSelectorProperty
Identifies the CellContentTemplateSelector property.
Declaration
public static readonly BindableProperty CellContentTemplateSelectorProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CellDecorationStyleProperty
Identifies the CellDecorationStyle property.
Declaration
public static readonly BindableProperty CellDecorationStyleProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CellDecorationStyleSelectorProperty
Identifies the CellDecorationStyleSelector property.
Declaration
public static readonly BindableProperty CellDecorationStyleSelectorProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
CellEditTemplateProperty
Identifies the CellEditTemplate property.
Declaration
public static readonly BindableProperty CellEditTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FilterControlTemplateProperty
Identifies the FilterControlTemplate property.
Declaration
public static readonly BindableProperty FilterControlTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FooterContentTemplateProperty
FooterStyleProperty
FooterTextProperty
HeaderContentTemplateProperty
Identifies the HeaderContentTemplate property.
Declaration
public static readonly BindableProperty HeaderContentTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
HeaderStyleProperty
Identifies the HeaderStyle property.
Declaration
public static readonly BindableProperty HeaderStyleProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
HeaderTextProperty
Identifies the HeaderText property.
Declaration
public static readonly BindableProperty HeaderTextProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsFilteredProperty
Identifies the IsFiltered property.
Declaration
public static readonly BindableProperty IsFilteredProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsFrozenProperty
Identifies the IsFrozen dependency property.
Declaration
public static readonly BindableProperty IsFrozenProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsResizableProperty
Identifies the IsResizable dependency property.
Declaration
public static readonly BindableProperty IsResizableProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsSearchableProperty
Identifies the IsSearchable property.
Declaration
public static readonly BindableProperty IsSearchableProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsVisibleProperty
Identifies the IsVisible property.
Declaration
public static readonly BindableProperty IsVisibleProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
MinimumWidthProperty
Identifies the MinimumWidth property.
Declaration
public static readonly BindableProperty MinimumWidthProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
NameProperty
Identifies the Name property.
Declaration
public static readonly BindableProperty NameProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ShowDistinctValuesFilterProperty
Identifies the ShowDistinctValuesFilter property.
Declaration
public static readonly BindableProperty ShowDistinctValuesFilterProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SizeModeProperty
Identifies the SizeMode property.
Declaration
public static readonly BindableProperty SizeModeProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
SortDirectionProperty
Identifies the SortDirection property.
Declaration
public static readonly BindableProperty SortDirectionProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
WidthProperty
Identifies the Width property.
Declaration
public static readonly BindableProperty WidthProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
Properties
ActualWidth
Gets the actual width of the column.
Declaration
public double ActualWidth { get; }
Property Value
System.Double
|
AggregateDescriptors
Gets the collection of AggregateDescriptorBase objects that defines the current aggregate functions to be applied when the data view is computed.
Declaration
public ObservableItemCollection<AggregateDescriptorBase> AggregateDescriptors { get; }
Property Value
ObservableItemCollection<AggregateDescriptorBase>
|
AggregateValues
Gets the aggregate values for the current column.
Declaration
public IEnumerable<string> AggregateValues { get; }
Property Value
System.Collections.Generic.IEnumerable<System.String>
|
CanUserEdit
Gets or sets a value indicating whether the user can edit this column.
Declaration
public bool CanUserEdit { get; set; }
Property Value
System.Boolean
The default value is "true". |
Remarks
To enable/disable editing in RadDataGrid see the Telerik.Maui.Controls.DataGrid.UserEditMode
CanUserFilter
Gets or sets a value indicating whether the user can filter this column by using the built-in filtering UI.
Declaration
public bool CanUserFilter { get; set; }
Property Value
System.Boolean
The default value is "true". |
Remarks
To enable/disable Filtering in RadDataGrid see the Telerik.Maui.Controls.DataGrid.UserFilterMode
CanUserGroup
Gets or sets a value indicating whether the user can group-by this column by using the built-in Grouping UI.
Declaration
public bool CanUserGroup { get; set; }
Property Value
System.Boolean
The default value is "true". |
Remarks
To enable/disable grouping in RadDataGrid see the Telerik.Maui.Controls.DataGrid.UserGroupMode.
CanUserReorder
Gets or sets a value indicating whether the user can use a drag gesture to reorder this column.
Declaration
public bool CanUserReorder { get; set; }
Property Value
System.Boolean
The default value is "true". |
Remarks
To enable/disable reordering of columns see the CanUserReorderColumns.
CanUserSort
Gets or sets a value indicating whether the user can sort the data by the values in this column.
Declaration
public bool CanUserSort { get; set; }
Property Value
System.Boolean
The default value is "true". |
Remarks
To enable/disable sorting in RadDataGrid see the Telerik.Maui.Controls.DataGrid.UserSortMode.
CellContentTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate instance that defines the appearance of each cell associated with tis column.
Declaration
public DataTemplate CellContentTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
CellContentTemplateSelector
Gets or sets the Microsoft.Maui.Controls.DataTemplateSelector instance that may be used to retrieve dynamic data templates on a per cell basis.
Declaration
public DataTemplateSelector CellContentTemplateSelector { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplateSelector
|
CellDecorationStyle
Gets or sets the DataGridBorderStyle object that defines the background of each cell associated with this column.
Declaration
public DataGridBorderStyle CellDecorationStyle { get; set; }
Property Value
DataGridBorderStyle
|
CellDecorationStyleSelector
Gets or sets the DataGridStyleSelector instance that allows for dynamic decoration on a per cell basis.
Declaration
public DataGridStyleSelector CellDecorationStyleSelector { get; set; }
Property Value
DataGridStyleSelector
|
CellEditTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate instance that defines the editor associated with tis column.
Declaration
public DataTemplate CellEditTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
DataGrid
Gets the corresponding RadDataGrid.
Declaration
public RadDataGrid DataGrid { get; }
Property Value
RadDataGrid
|
FilterControlTemplate
Gets or sets the user defined template used for the filtering UI. The template must contain an instance of the DataGridFilterControlBase class.
Declaration
public DataTemplate FilterControlTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
FooterContentTemplate
FooterStyle
FooterText
HeaderContentTemplate
Gets or sets the Microsoft.Maui.Controls.DataTemplate instance that defines the appearance of the header.
Declaration
public DataTemplate HeaderContentTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
HeaderStyle
Gets or sets the DataGridColumnHeaderStyle instance that defines the appearance of the header of the column.
Declaration
public DataGridColumnHeaderStyle HeaderStyle { get; set; }
Property Value
DataGridColumnHeaderStyle
|
HeaderText
Gets or sets the content to be displayed in the Header UI that represents the column.
Declaration
public string HeaderText { get; set; }
Property Value
System.String
|
IsAutoGenerated
Gets a value indicating whether the column is auto-generated internally.
Declaration
public bool IsAutoGenerated { get; }
Property Value
System.Boolean
|
IsFiltered
Gets a value indicating whether the column is currently filtered.
Declaration
public bool IsFiltered { get; }
Property Value
System.Boolean
|
IsFrozen
Gets or sets a value indicating whether the DataGridColumn is frozen.
Declaration
public bool IsFrozen { get; set; }
Property Value
System.Boolean
|
IsResizable
Gets or sets a value indicating whether the user can resize the DataGridColumn. This is only suppoted in WinUI and MacCatalyst.
Declaration
public bool IsResizable { get; set; }
Property Value
System.Boolean
|
IsSearchable
Gets or sets a value indicating whether the cells for this column should be included in searching. See SearchSettings.
Declaration
public Nullable<bool> IsSearchable { get; set; }
Property Value
System.Nullable<System.Boolean>
|
IsVisible
Gets or sets a value indicating whether if the current column is visible or not.
Declaration
public bool IsVisible { get; set; }
Property Value
System.Boolean
|
MinimumWidth
Gets or sets the minimum width for the column. Applicable when the SizeMode property is set to Fixed.
Declaration
public double MinimumWidth { get; set; }
Property Value
System.Double
|
Name
Gets or sets the unique name of the column. Typically this is used as an identifier for this particular instance.
Declaration
public string Name { get; set; }
Property Value
System.String
|
Examples
<telerikGrid:RadDataGrid x:Name="grid">
<telerikGrid:RadDataGrid.Columns>
<telerikGrid:DataGridTextColumn Name="FirstColumn"/>
</telerikGrid:RadDataGrid.Columns>
</telerikGrid:RadDataGrid>
this.grid.Columns[0].Name = "FirstColumn";
ShowDistinctValuesFilter
Gets or sets a value that indicates whether the DataGridDistinctValuesFilterView should be shown inside the filtering view to display a list of distinct values to filter by.
Declaration
public bool ShowDistinctValuesFilter { get; set; }
Property Value
System.Boolean
|
SizeMode
Gets or sets the DataGridColumnSizeMode value that controls how the column and its associated cells are sized horizontally.
Declaration
public DataGridColumnSizeMode SizeMode { get; set; }
Property Value
DataGridColumnSizeMode
|
SortDirection
Gets the current sort direction of the column.
Declaration
public SortDirection SortDirection { get; }
Property Value
SortDirection
|
Width
Gets or sets the fixed width for the column. Applicable when the SizeMode property is set to DataGridColumnSizeMode.Fixed.
Declaration
public double Width { get; set; }
Property Value
System.Double
|
Methods
GetValueForInstance(Object)
Retrieves the column value for the provided object instance. This actually represents the content of a grid cell where a cell is defined by a row (data item) and a column.
Declaration
public virtual object GetValueForInstance(object instance)
Parameters
System.Object
instance
|
Returns
System.Object
|
InitDefaultFooterStyle()
InitDefaultHeaderStyle()
Initializes the default style for the column's header.
Declaration
protected virtual void InitDefaultHeaderStyle()
OnPropertyChanged(String)
Declaration
protected override void OnPropertyChanged(string propertyName = null)
Parameters
System.String
propertyName
|