skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Release History
  • Migrate to .NET MAUI
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Forums
    • Videos
    • Blogs
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

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
System.Object
DataGridColumn
DataGridTemplateColumn
DataGridTypedColumn
Namespace: Telerik.XamarinForms.DataGrid
Assembly: Telerik.XamarinForms.DataGrid.dll

Syntax

public abstract class DataGridColumn : BindableObject, IDataDescriptorPeer, IDataGridColumnDefinition

Constructors

DataGridColumn()

Initializes a new instance of the DataGridColumn class.

Declaration
protected 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

Identifies the FooterContentTemplate property.

Declaration
public static readonly BindableProperty FooterContentTemplateProperty
Field Value
Xamarin.Forms.BindableProperty

FooterStyleProperty

Identifies the FooterStyle property.

Declaration
public static readonly BindableProperty FooterStyleProperty
Field Value
Xamarin.Forms.BindableProperty

FooterTextProperty

Identifies the FooterText property.

Declaration
public static readonly BindableProperty FooterTextProperty
Field Value
Xamarin.Forms.BindableProperty

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

Gets or sets the Xamarin.Forms.DataTemplate instance that defines the appearance of the footer.

Declaration
public DataTemplate FooterContentTemplate { get; set; }
Property Value
Xamarin.Forms.DataTemplate

FooterStyle

Gets or sets the DataGridColumnFooterStyle instance that defines the appearance of the DataGridColumn footer.

Declaration
public DataGridColumnFooterStyle FooterStyle { get; set; }
Property Value
DataGridColumnFooterStyle

FooterText

Gets or sets the content to be displayed in the Footer UI of the Column.

Declaration
public string FooterText { get; set; }
Property Value
System.String

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 control.

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. This value is used by the string indexer in the Columns collection.

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()

Initializes the default style for the column's footer.

Declaration
protected virtual void 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

Sample Applications
  • Telerik Tagit
  • iOS Demo App
  • Android Demo App
Support Resources
  • iOS Wrappers
  • Android Wrappers
  • Xamarin.Forms SDK Examples
Community
  • Forums
  • Blogs
  • Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.