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

    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
    • Roadmap
    • Release History
  • Support and Learning

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

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • 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 GridViewColumn

Abstract class, representing the base for all types of columns in RadGridView A special inheritor is the GridViewDataColumn which is base for all data-bound columns.

Implements System.IComparable and System.ComponentModel.INotifyPropertyChanged interfaces

Inheritance
System.Object
DisposableObject
RadObject
GridViewColumn
GridViewDataColumn
GridViewGroupColumn
GridViewIndentColumn
GridViewRowHeaderColumn
GridViewSelectColumn
Inherited Members
RadObject.BindingContextProperty
RadObject.RadType
RadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)
RadObject.DisposeManagedResources()
RadObject.ClearPropertyStore()
RadObject.SuspendPropertyNotifications()
RadObject.ResumePropertyNotifications()
RadObject.GetPropertyValue(RadProperty)
RadObject.SetDefaultValueOverride(RadProperty, Object)
RadObject.SetValueAtDesignTime(RadProperty, Object)
RadObject.GetValue(RadProperty)
RadObject.SetValue(RadProperty, Object)
RadObject.ResetValue(RadProperty)
RadObject.ResetLocalValue(RadProperty)
RadObject.ResetValue(RadProperty, ValueResetFlags)
RadObject.UpdateValue(RadProperty)
RadObject.GetValueSource(RadProperty)
RadObject.GetRegisteredRadProperty(String)
RadObject.UpdateValueCore(RadPropertyValue)
RadObject.SetValueCore(RadPropertyValue, Object, Object, ValueSource)
RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)
RadObject.GetDefaultValue(RadPropertyValue, Object)
RadObject.CoerceValue(RadPropertyValue, Object)
RadObject.ShouldSerializeProperty(PropertyDescriptor)
RadObject.ShouldSerializeProperty(RadProperty)
RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)
RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)
RadObject.UnbindProperty(RadProperty)
RadObject.AddStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(RadProperty)
RadObject.GetInheritedValue(RadProperty)
RadObject.OnNotifyPropertyChanged(String)
RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)
RadObject.PropertyValues
RadObject.IsDesignMode
RadObject.PropertyFilter
RadObject.RadObjectType
RadObject.BindingContext
RadObject.PropertyChanged
RadObject.RadPropertyChanged
RadObject.RadPropertyChanging
RadObject.ShouldSerializePropertyHandler
DisposableObject.GetBitState(Int64)
DisposableObject.SetBitState(Int64, Boolean)
DisposableObject.OnBitStateChanged(Int64, Boolean, Boolean)
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.PerformDispose(Boolean)
DisposableObject.DisposeUnmanagedResources()
DisposableObject.BitState
DisposableObject.Events
DisposableObject.IsDisposing
DisposableObject.IsDisposed
DisposableObject.Disposed
DisposableObject.Disposing
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll

Syntax

public abstract class GridViewColumn : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IEditorProvider, INotifyPropertyChangingEx

Constructors

GridViewColumn()

Initializes a new instance of the GridViewColumn.

Declaration
public GridViewColumn()

GridViewColumn(String)

Initializes a new instance of the GridViewColumn.

Declaration
public GridViewColumn(string fieldName)
Parameters
System.String fieldName

A string value referring to the unique name of the column.

GridViewColumn(String, String)

Initializes a new instance of the GridViewColumn.

Declaration
public GridViewColumn(string name, string fieldName)
Parameters
System.String name

A string value referring to the unique name of the column.

System.String fieldName

A string value referring to the field name to which the column is bound.

Fields

AllowGroupProperty

Declaration
public static RadProperty AllowGroupProperty
Field Value
RadProperty

AllowHideProperty

Declaration
public static RadProperty AllowHideProperty
Field Value
RadProperty

AllowReorderProperty

Declaration
public static RadProperty AllowReorderProperty
Field Value
RadProperty

AllowResizeProperty

Declaration
public static RadProperty AllowResizeProperty
Field Value
RadProperty

AllowSortProperty

Declaration
public static RadProperty AllowSortProperty
Field Value
RadProperty

AutoEllipsisProperty

Declaration
public static RadProperty AutoEllipsisProperty
Field Value
RadProperty

AutoSizeModeProperty

Declaration
public static RadProperty AutoSizeModeProperty
Field Value
RadProperty

DisableHTMLRenderingProperty

Declaration
public static RadProperty DisableHTMLRenderingProperty
Field Value
RadProperty

EnableExpressionEditorProperty

Declaration
public static RadProperty EnableExpressionEditorProperty
Field Value
RadProperty

ExpressionProperty

Declaration
public static RadProperty ExpressionProperty
Field Value
RadProperty

FieldNameProperty

Declaration
public static RadProperty FieldNameProperty
Field Value
RadProperty

HeaderImageProperty

Declaration
public static RadProperty HeaderImageProperty
Field Value
RadProperty

HeaderSvgImageProperty

Declaration
public static RadProperty HeaderSvgImageProperty
Field Value
RadProperty

HeaderTextAlignmentProperty

Declaration
public static RadProperty HeaderTextAlignmentProperty
Field Value
RadProperty

HeaderTextProperty

Declaration
public static RadProperty HeaderTextProperty
Field Value
RadProperty

ImageLayoutProperty

Declaration
public static RadProperty ImageLayoutProperty
Field Value
RadProperty

IsAutoGeneratedProperty

Declaration
public static RadProperty IsAutoGeneratedProperty
Field Value
RadProperty

IsCurrentProperty

Declaration
public static RadProperty IsCurrentProperty
Field Value
RadProperty

IsVisibleProperty

Declaration
public static RadProperty IsVisibleProperty
Field Value
RadProperty

MaxWidthProperty

Declaration
public static RadProperty MaxWidthProperty
Field Value
RadProperty

MinWidthProperty

Declaration
public static RadProperty MinWidthProperty
Field Value
RadProperty

NameProperty

Declaration
public static RadProperty NameProperty
Field Value
RadProperty

PinPositionProperty

Declaration
public static RadProperty PinPositionProperty
Field Value
RadProperty

ReadOnlyProperty

Declaration
public static RadProperty ReadOnlyProperty
Field Value
RadProperty

RenderWidthProperty

Declaration
public static RadProperty RenderWidthProperty
Field Value
RadProperty

RowSpanProperty

Declaration
public static RadProperty RowSpanProperty
Field Value
RadProperty

ShowEditorProperty

Declaration
public static RadProperty ShowEditorProperty
Field Value
RadProperty

StretchVerticallyProperty

Declaration
public static RadProperty StretchVerticallyProperty
Field Value
RadProperty

TagProperty

Declaration
public static RadProperty TagProperty
Field Value
RadProperty

TextAlignmentProperty

Declaration
public static RadProperty TextAlignmentProperty
Field Value
RadProperty

TextImageRelationProperty

Declaration
public static RadProperty TextImageRelationProperty
Field Value
RadProperty

VisibleInColumnChooserProperty

Declaration
public static RadProperty VisibleInColumnChooserProperty
Field Value
RadProperty

WidthProperty

Declaration
public static RadProperty WidthProperty
Field Value
RadProperty

WrapTextProperty

Declaration
public static RadProperty WrapTextProperty
Field Value
RadProperty

Properties

AllowGroup

Gets or sets a value indicating whether the user can group data based on the content of this column.

Declaration
public virtual bool AllowGroup { get; set; }
Property Value
System.Boolean

See Also
EnableGrouping
EnableGrouping

AllowHide

Gets or sets value indicating whether the user can hide the column.

Declaration
public virtual bool AllowHide { get; set; }
Property Value
System.Boolean

AllowReorder

Gets or sets a value indicating whether the user can reorder this column using the mouse.

Declaration
public virtual bool AllowReorder { get; set; }
Property Value
System.Boolean

AllowResize

Gets or sets value indicating whether the user can resize the column.

Declaration
public virtual bool AllowResize { get; set; }
Property Value
System.Boolean

AllowSort

Gets or sets a value indicating whether the user can sort the data in the OwnerTemplate based on the contents of this column.

Declaration
public virtual bool AllowSort { get; set; }
Property Value
System.Boolean

AutoEllipsis

Gets or sets the auto ellipsis.

Declaration
public bool AutoEllipsis { get; set; }
Property Value
System.Boolean

The auto ellipsis.

AutoSizeMode

Gets or sets the mode by which the column automatically adjusts its width after BestFit is executed.

Declaration
public BestFitColumnMode AutoSizeMode { get; set; }
Property Value
BestFitColumnMode

ConditionalFormattingObjectList

Gets list of BaseFormattingObject instances that define the currently applied conditional formatting of the data in the column.

Declaration
public virtual ConditionalFormattingObjectCollection ConditionalFormattingObjectList { get; }
Property Value
ConditionalFormattingObjectCollection

DisableHTMLRendering

Disable or Enable HTML-like text rendering in the column.

Declaration
public bool DisableHTMLRendering { get; set; }
Property Value
System.Boolean

DpiScale

Gets or sets the DPI scale.

Declaration
public SizeF DpiScale { get; }
Property Value
System.Drawing.SizeF

The dpi scale.

EnableExpressionEditor

Gets or sets the value indicating if expression editor menu item will be available to the user.

Declaration
public bool EnableExpressionEditor { get; set; }
Property Value
System.Boolean

EventDispatcher

Gets the event dispatcher.

Declaration
protected EventDispatcher EventDispatcher { get; }
Property Value
EventDispatcher

The event dispatcher.

Expression

Gets or sets the expression used to calculate the values of this column.

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

FieldName

Gets or sets the name data source property or database column to which the GridViewDataColumn is bound.

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

HeaderImage

Gets or set the ColumnInfo Header image.

Declaration
public virtual Image HeaderImage { get; set; }
Property Value
System.Drawing.Image

HeaderSvgImage

Gets or set the ColumnInfo Header vector image.

Declaration
public virtual RadSvgImage HeaderSvgImage { get; set; }
Property Value
RadSvgImage

HeaderText

Gets or sets the caption text on the column's header cell.

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

HeaderTextAlignment

Gets or sets a value indicating the position of the HeaderText within the header cell.

Declaration
public ContentAlignment HeaderTextAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment

ImageLayout

Gets or sets the image layout of the image inside the cells.

Declaration
public virtual ImageLayout ImageLayout { get; set; }
Property Value
System.Windows.Forms.ImageLayout

Index

Gets a value indicating the position of the column in the Columns collection of the OwnerTemplate.

Declaration
public int Index { get; }
Property Value
System.Int32

IsAutoGenerated

Gets value indicating whether the current column is automatically created when the RadGridView is being bound to a data source.

Declaration
public bool IsAutoGenerated { get; set; }
Property Value
System.Boolean

IsCurrent

Gets value indicating whether the column contains the currently selected cell in the OwnerTemplate.

Declaration
public bool IsCurrent { get; set; }
Property Value
System.Boolean

IsDataBound

Gets a value indicating whether the column is bound to the data field referred by FieldName.

Declaration
public virtual bool IsDataBound { get; }
Property Value
System.Boolean

IsFieldNamePath

Gets whether is field name path.

Declaration
public bool IsFieldNamePath { get; }
Property Value
System.Boolean

The is field name path.

IsGrouped

Gets a value indicating whether the data in the OwnerTemplate is grouped based on the content of this column.

Declaration
public virtual bool IsGrouped { get; }
Property Value
System.Boolean

See Also
GroupDescriptors

IsPinned

Gets or sets value indicating whether the current column is pinned and cannot be moved from its location when a user scrolls horizontally.

Declaration
public bool IsPinned { get; set; }
Property Value
System.Boolean

IsSorted

Gets a boolean value indicating whether a sort order of data in the column is currently applied.

Declaration
public virtual bool IsSorted { get; }
Property Value
System.Boolean

Remarks

When multi-column sorting is applied, the column might be partially sorted.

IsVisible

Gets or sets a value indicating whether the column is visible.

Declaration
public virtual bool IsVisible { get; set; }
Property Value
System.Boolean

MaxWidth

Gets or sets the maximal width, in pixels, of the column.

Declaration
public int MaxWidth { get; set; }
Property Value
System.Int32

MinWidth

Gets or sets the minimum width, in pixels, of the column.

Declaration
public int MinWidth { get; set; }
Property Value
System.Int32

Name

Gets or sets a string value representing the column's unique name in the Columns collection of the OwnerTemplate.

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

OwnerTemplate

Gets the instance of GridViewTemplate which the column belongs to.

Declaration
public GridViewTemplate OwnerTemplate { get; }
Property Value
GridViewTemplate

PinPosition

Gets or sets the pin position for the row. When the column is pinned, it cannot be moved from its location when a user scrolls horizontally.

Declaration
public PinnedColumnPosition PinPosition { get; set; }
Property Value
PinnedColumnPosition

ReadOnly

Gets or sets a value indicating whether the user can edit the data in the column's cells.

Declaration
public virtual bool ReadOnly { get; set; }
Property Value
System.Boolean

RowSpan

Gets or sets the vertical span of the cells in that column (the height) in pixels. Relevant only in ColumnGroupsViewDefinition.

Declaration
public int RowSpan { get; set; }
Property Value
System.Int32

SortOrder

Gets or sets a value indicating the sort order of data in the column.

Declaration
public RadSortOrder SortOrder { get; set; }
Property Value
RadSortOrder

StretchVertically

Gets or sets a value indicating whether to stretch the column height vertically. Used with ColumnGroupsViewDefinition.

Declaration
public bool StretchVertically { get; set; }
Property Value
System.Boolean

Tag

Gets or sets the object that contains data about the column.

Declaration
public object Tag { get; set; }
Property Value
System.Object

TextAlignment

Gets or sets a value indicating the position of the cell content within a column's cells.

Declaration
public virtual ContentAlignment TextAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment

TextImageRelation

Gets or sets a value indicating the TextImageRelation: ImageAboveText, ImageBeforeText, Overlay, TextAboveImage, and TextBeforeImage.

Declaration
public TextImageRelation TextImageRelation { get; set; }
Property Value
System.Windows.Forms.TextImageRelation

VisibleInColumnChooser

Gets or sets a value indicating whether the column will be visible in ColumnChooserElement.

Declaration
public virtual bool VisibleInColumnChooser { get; set; }
Property Value
System.Boolean

Remarks

Use this property if you want to hide columns from the user.

Width

Gets or sets the width of the column.

Declaration
public virtual int Width { get; set; }
Property Value
System.Int32

WrapText

Gets or sets value indicating whether the text in each cell in the column should be wrapped.

Declaration
public bool WrapText { get; set; }
Property Value
System.Boolean

Methods

BestFit()

Adjusts the column width to fit the contents of all cells in the column, including the header cell.

Declaration
public void BestFit()

CanDragToGroup()

Determines whether this column may be dragged onto the GroupBy panel.

Declaration
public bool CanDragToGroup()
Returns
System.Boolean

CanDragToGroup(GridViewTemplate)

Determines whether this column may be dragged onto the GroupBy panel.

Declaration
public bool CanDragToGroup(GridViewTemplate template)
Parameters
GridViewTemplate template

Returns
System.Boolean

DispatchEvent(KnownEvents, GridEventType, GridEventDispatchMode, Object, Object[])

Dispatches the event.

Declaration
protected virtual void DispatchEvent(KnownEvents id, GridEventType type, GridEventDispatchMode dispatchMode, object originator, object[] arguments)
Parameters
KnownEvents id

The id.

GridEventType type

The type.

GridEventDispatchMode dispatchMode

The dispatch mode.

System.Object originator

The originator.

System.Object[] arguments

The arguments.

GetCellType(GridViewRowInfo)

Returns the type of cell element to be created for the specified row.

Declaration
public virtual Type GetCellType(GridViewRowInfo row)
Parameters
GridViewRowInfo row

The specified row.

Returns
System.Type

The type of the cell to be created.

GetDefaultEditor()

Returns an editor instance of the default type for the editor provider.

Declaration
public virtual IInputEditor GetDefaultEditor()
Returns
IInputEditor

An object that implements IInputEditor interface.

Implements
IEditorProvider.GetDefaultEditor()

GetDefaultEditorType()

Gets the default editor type for the editor provider.

Declaration
public virtual Type GetDefaultEditorType()
Returns
System.Type

The default type.

Implements
IEditorProvider.GetDefaultEditorType()

GetDefaultGroupByExpression()

Retrieves the default group-by expression string for the column.

Declaration
public virtual string GetDefaultGroupByExpression()
Returns
System.String

The string value representing a group-by expression with default settings.

GetDefaultMinWidth()

Gets a value indicating default minimum width for the inherited column type. If not overridden in inheritor class it defaults to 5.

Declaration
protected virtual int GetDefaultMinWidth()
Returns
System.Int32

GetEventInfo(RadProperty, out GridEventDispatchMode)

Gets the event info.

Declaration
protected virtual GridEventType GetEventInfo(RadProperty property, out GridEventDispatchMode dispatchMode)
Parameters
RadProperty property

The property.

GridEventDispatchMode dispatchMode

The dispatch mode.

Returns
GridEventType

Initialize()

Initializes the column.

Declaration
protected virtual void Initialize()
Remarks

This method is called when the column is associated with GridViewTemplate.

InitializeEditor(IInputEditor)

Initializes a specified editor.

Declaration
public virtual void InitializeEditor(IInputEditor editor)
Parameters
IInputEditor editor

An object that implements IInputEditor interface.

Implements
IEditorProvider.InitializeEditor(IInputEditor)

IsPropertyCancelable(RadPropertyMetadata)

Determines whether the specified property may be canceled.

Declaration
protected override bool IsPropertyCancelable(RadPropertyMetadata metadata)
Parameters
RadPropertyMetadata metadata

The metadata associated with the property change.

Returns
System.Boolean

Overrides
RadObject.IsPropertyCancelable(RadPropertyMetadata)

OnNotifyPropertyChanging(String)

Declaration
protected void OnNotifyPropertyChanging(string propertyName)
Parameters
System.String propertyName

OnNotifyPropertyChanging(PropertyChangingEventArgsEx)

Declaration
protected virtual void OnNotifyPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
PropertyChangingEventArgsEx e

OnPropertyChanged(RadPropertyChangedEventArgs)

Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs e

Overrides
RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)

OnPropertyChanging(RadPropertyChangingEventArgs)

Declaration
protected override void OnPropertyChanging(RadPropertyChangingEventArgs e)
Parameters
RadPropertyChangingEventArgs e

Overrides
RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)

Sort(RadSortOrder, Boolean)

Sorts the specified sort order.

Declaration
public bool Sort(RadSortOrder sortOrder, bool multiSortMode)
Parameters
RadSortOrder sortOrder

The sort order.

System.Boolean multiSortMode

if set to true [multi sort mode].

Returns
System.Boolean

ToString()

Returns a string representation of the column.

Declaration
public override string ToString()
Returns
System.String

The string representation for the column.

Overrides
System.Object.ToString()

Events

PropertyChanging

Declaration
public event PropertyChangingEventHandlerEx PropertyChanging
Event Type
PropertyChangingEventHandlerEx

Implements
INotifyPropertyChangingEx.PropertyChanging

Extension Methods

CommonExtensions.ClearIfNoBindingAndSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
CommonExtensions.SetIfDifferent(RadObject, RadProperty, Object)
CommonExtensions.ClearIfSet(RadObject, RadProperty)
CommonExtensions.IsLocalValueSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing 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.