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.XamarinForms.DataGrid
Assembly: Telerik.XamarinForms.DataGrid.dll
Syntax
public abstract class DataGridColumn : BindableObject, IDataDescriptorPeer, IDataGridColumnDefinition
Constructors
DataGridColumn()
Fields
CanUserEditProperty
Identifies the CanUserEdit property.
Declaration
public static readonly BindableProperty CanUserEditProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CanUserFilterProperty
Identifies the CanUserFilter property.
Declaration
public static readonly BindableProperty CanUserFilterProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CanUserGroupProperty
Identifies the CanUserGroup property.
Declaration
public static readonly BindableProperty CanUserGroupProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CanUserSortProperty
Identifies the CanUserSort property.
Declaration
public static readonly BindableProperty CanUserSortProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CellContentTemplateProperty
Identifies the CellContentTemplate property.
Declaration
public static readonly BindableProperty CellContentTemplateProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CellContentTemplateSelectorProperty
Identifies the CellContentTemplateSelector property.
Declaration
public static readonly BindableProperty CellContentTemplateSelectorProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CellDecorationStyleProperty
Identifies the CellDecorationStyle property.
Declaration
public static readonly BindableProperty CellDecorationStyleProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CellDecorationStyleSelectorProperty
Identifies the CellDecorationStyleSelector property.
Declaration
public static readonly BindableProperty CellDecorationStyleSelectorProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
CellEditTemplateProperty
Identifies the CellEditTemplate property.
Declaration
public static readonly BindableProperty CellEditTemplateProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
FilterControlTemplateProperty
Identifies the FilterControlTemplate property.
Declaration
public static readonly BindableProperty FilterControlTemplateProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
FooterContentTemplateProperty
FooterStyleProperty
FooterTextProperty
HeaderContentTemplateProperty
Identifies the HeaderContentTemplate property.
Declaration
public static readonly BindableProperty HeaderContentTemplateProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
HeaderStyleProperty
Identifies the HeaderStyle property.
Declaration
public static readonly BindableProperty HeaderStyleProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
HeaderTextProperty
Identifies the HeaderText property.
Declaration
public static readonly BindableProperty HeaderTextProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
IsVisibleProperty
Identifies the IsVisible property.
Declaration
public static readonly BindableProperty IsVisibleProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
NameProperty
Identifies the Name property.
Declaration
public static readonly BindableProperty NameProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
SizeModeProperty
Identifies the SizeMode property.
Declaration
public static readonly BindableProperty SizeModeProperty
Field Value
|
Xamarin.Forms.BindableProperty
|
WidthProperty
Identifies the Width property.
Declaration
public static readonly BindableProperty WidthProperty
Field Value
|
Xamarin.Forms.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.XamarinForms.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.XamarinForms.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.XamarinForms.DataGrid.UserGroupMode.
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.XamarinForms.DataGrid.UserSortMode.
CellContentTemplate
Gets or sets the Xamarin.Forms.DataTemplate instance that defines the appearance of each cell associated with tis column.
Declaration
public DataTemplate CellContentTemplate { get; set; }
Property Value
|
Xamarin.Forms.DataTemplate
|
CellContentTemplateSelector
Gets or sets the Xamarin.Forms.DataTemplateSelector instance that may be used to retrieve dynamic data templates on a per cell basis.
Declaration
public DataTemplateSelector CellContentTemplateSelector { get; set; }
Property Value
|
Xamarin.Forms.DataTemplateSelector
|
CellDecorationStyle
Gets or sets the DataGridBorderStyle object that defines the background of each cell associated with this column. The TargetType property of the Style object is Xamarin.Forms.Rectangle.
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 Xamarin.Forms.DataTemplate instance that defines the editor associated with tis column.
Declaration
public DataTemplate CellEditTemplate { get; set; }
Property Value
|
Xamarin.Forms.DataTemplate
|
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
|
Xamarin.Forms.DataTemplate
|
FooterContentTemplate
FooterStyle
FooterText
HeaderContentTemplate
Gets or sets the Xamarin.Forms.DataTemplate instance that defines the appearance of the header.
Declaration
public DataTemplate HeaderContentTemplate { get; set; }
Property Value
|
Xamarin.Forms.DataTemplate
|
HeaderStyle
Gets or sets the DataGridColumnHeaderStyle instance that defines the appearance of the
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
|
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
|
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";
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
|
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
|