Class GridViewColumn
Abstract class, representing the base for all types of columns in Rad
Implements System.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public abstract class GridViewColumn : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IEditorProvider, INotifyPropertyChangingEx
Constructors
GridViewColumn()
GridViewColumn(String)
Initializes a new instance of the Grid
Declaration
public GridViewColumn(string fieldName)
Parameters
System. A string value referring to the unique name of the column. |
GridViewColumn(String, String)
Initializes a new instance of the Grid
Declaration
public GridViewColumn(string name, string fieldName)
Parameters
System. A string value referring to the unique name of the column. |
System. A string value referring to the field name to which the column is bound. |
Fields
AllowGroupProperty
AllowHideProperty
AllowReorderProperty
AllowResizeProperty
AllowSortProperty
AutoEllipsisProperty
AutoSizeModeProperty
DisableHTMLRenderingProperty
EnableExpressionEditorProperty
ExpressionProperty
FieldNameProperty
HeaderImageProperty
HeaderSvgImageProperty
HeaderTextAlignmentProperty
HeaderTextProperty
ImageLayoutProperty
IsAutoGeneratedProperty
IsCurrentProperty
IsVisibleProperty
MaxWidthProperty
MinWidthProperty
NameProperty
PinPositionProperty
ReadOnlyProperty
RenderWidthProperty
RowSpanProperty
ShowEditorProperty
StretchVerticallyProperty
TagProperty
TextAlignmentProperty
TextImageRelationProperty
VisibleInColumnChooserProperty
WidthProperty
WrapTextProperty
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.
|
See Also
AllowHide
Gets or sets value indicating whether the user can hide the column.
Declaration
public virtual bool AllowHide { get; set; }
Property Value
System.
|
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.
|
AllowResize
Gets or sets value indicating whether the user can resize the column.
Declaration
public virtual bool AllowResize { get; set; }
Property Value
System.
|
AllowSort
Gets or sets a value indicating whether the user can sort the data in the Owner
Declaration
public virtual bool AllowSort { get; set; }
Property Value
System.
|
AutoEllipsis
Gets or sets the auto ellipsis.
Declaration
public bool AutoEllipsis { get; set; }
Property Value
System. 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
ConditionalFormattingObjectList
Gets list of Base
Declaration
public virtual ConditionalFormattingObjectCollection ConditionalFormattingObjectList { get; }
Property Value
DisableHTMLRendering
Disable or Enable HTML-like text rendering in the column.
Declaration
public bool DisableHTMLRendering { get; set; }
Property Value
System.
|
DpiScale
Gets or sets the DPI scale.
Declaration
public SizeF DpiScale { get; }
Property Value
System. 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.
|
EventDispatcher
Gets the event dispatcher.
Declaration
protected EventDispatcher EventDispatcher { get; }
Property Value
Event 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.
|
FieldName
Gets or sets the name data source property or database column to which the Grid
Declaration
public string FieldName { get; set; }
Property Value
System.
|
HeaderImage
Gets or set the ColumnInfo Header image.
Declaration
public virtual Image HeaderImage { get; set; }
Property Value
System.
|
HeaderSvgImage
Gets or set the ColumnInfo Header vector image.
Declaration
public virtual RadSvgImage HeaderSvgImage { get; set; }
Property Value
HeaderText
Gets or sets the caption text on the column's header cell.
Declaration
public virtual string HeaderText { get; set; }
Property Value
System.
|
HeaderTextAlignment
Gets or sets a value indicating the position of the Header
Declaration
public ContentAlignment HeaderTextAlignment { get; set; }
Property Value
System.
|
ImageLayout
Gets or sets the image layout of the image inside the cells.
Declaration
public virtual ImageLayout ImageLayout { get; set; }
Property Value
System.
|
Index
Gets a value indicating the position of the column in the Columns collection of the Owner
Declaration
public int Index { get; }
Property Value
System.
|
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.
|
IsCurrent
Gets value indicating whether the column contains the currently selected cell in the Owner
Declaration
public bool IsCurrent { get; set; }
Property Value
System.
|
IsDataBound
Gets a value indicating whether the column is bound to the data field referred by Field
Declaration
public virtual bool IsDataBound { get; }
Property Value
System.
|
IsFieldNamePath
Gets whether is field name path.
Declaration
public bool IsFieldNamePath { get; }
Property Value
System. The is field name path. |
IsGrouped
Gets a value indicating whether the data in the Owner
Declaration
public virtual bool IsGrouped { get; }
Property Value
System.
|
See Also
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.
|
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.
|
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.
|
MaxWidth
Gets or sets the maximal width, in pixels, of the column.
Declaration
public int MaxWidth { get; set; }
Property Value
System.
|
MinWidth
Gets or sets the minimum width, in pixels, of the column.
Declaration
public int MinWidth { get; set; }
Property Value
System.
|
Name
Gets or sets a string value representing the column's unique name in the Columns collection of the Owner
Declaration
public virtual string Name { get; set; }
Property Value
System.
|
OwnerTemplate
Gets the instance of Grid
Declaration
public GridViewTemplate OwnerTemplate { get; }
Property Value
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
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.
|
RowSpan
Gets or sets the vertical span of the cells in that column (the height) in pixels.
Relevant only in Column
Declaration
public int RowSpan { get; set; }
Property Value
System.
|
SortOrder
Gets or sets a value indicating the sort order of data in the column.
Declaration
public RadSortOrder SortOrder { get; set; }
Property Value
StretchVertically
Gets or sets a value indicating whether to stretch the column height vertically. Used with Column
Declaration
public bool StretchVertically { get; set; }
Property Value
System.
|
Tag
Gets or sets the object that contains data about the column.
Declaration
public object Tag { get; set; }
Property Value
System.
|
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.
|
TextImageRelation
Gets or sets a value indicating the TextImageRelation: ImageAboveText, ImageBeforeText, Overlay, TextAboveImage, and TextBeforeImage.
Declaration
public TextImageRelation TextImageRelation { get; set; }
Property Value
System.
|
VisibleInColumnChooser
Gets or sets a value indicating whether the column will be visible in Column
Declaration
public virtual bool VisibleInColumnChooser { get; set; }
Property Value
System.
|
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.
|
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.
|
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.
|
CanDragToGroup(GridViewTemplate)
Determines whether this column may be dragged onto the GroupBy panel.
Declaration
public bool CanDragToGroup(GridViewTemplate template)
Parameters
Grid
|
Returns
System.
|
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
Known The id. |
Grid The type. |
Grid The dispatch mode. |
System. The originator. |
System. 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
Grid The specified row. |
Returns
System. 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
IInput An object that implements IInput |
Implements
GetDefaultEditorType()
Gets the default editor type for the editor provider.
Declaration
public virtual Type GetDefaultEditorType()
Returns
System. The default type. |
Implements
GetDefaultGroupByExpression()
Retrieves the default group-by expression string for the column.
Declaration
public virtual string GetDefaultGroupByExpression()
Returns
System. 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.
|
GetEventInfo(RadProperty, out GridEventDispatchMode)
Gets the event info.
Declaration
protected virtual GridEventType GetEventInfo(RadProperty property, out GridEventDispatchMode dispatchMode)
Parameters
Rad The property. |
Grid The dispatch mode. |
Returns
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
IInput An object that implements IInput |
Implements
IsPropertyCancelable(RadPropertyMetadata)
Determines whether the specified property may be canceled.
Declaration
protected override bool IsPropertyCancelable(RadPropertyMetadata metadata)
Parameters
Rad The metadata associated with the property change. |
Returns
System.
|
Overrides
OnNotifyPropertyChanging(String)
Declaration
protected void OnNotifyPropertyChanging(string propertyName)
Parameters
System.
|
OnNotifyPropertyChanging(PropertyChangingEventArgsEx)
Declaration
protected virtual void OnNotifyPropertyChanging(PropertyChangingEventArgsEx e)
Parameters
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
Overrides
OnPropertyChanging(RadPropertyChangingEventArgs)
Declaration
protected override void OnPropertyChanging(RadPropertyChangingEventArgs e)
Parameters
Overrides
Sort(RadSortOrder, Boolean)
Sorts the specified sort order.
Declaration
public bool Sort(RadSortOrder sortOrder, bool multiSortMode)
Parameters
Rad The sort order. |
System. if set to |
Returns
System.
|
ToString()
Returns a string representation of the column.
Declaration
public override string ToString()
Returns
System. The string representation for the column. |
Overrides
Events
PropertyChanging
Declaration
public event PropertyChangingEventHandlerEx PropertyChanging