DataGridColumn DataGridColumn DataGridColumn DataGridColumn Class

Definition

Represents a DataGrid column.

public ref class DataGridColumn abstract : System::Windows::DependencyObject
public abstract class DataGridColumn : System.Windows.DependencyObject
type DataGridColumn = class
    inherit DependencyObject
Public MustInherit Class DataGridColumn
Inherits DependencyObject
Inheritance
Derived

Remarks

This abstract class provides the base functionality for all DataGrid columns.

Constructors

DataGridColumn() DataGridColumn() DataGridColumn() DataGridColumn()

Initializes a new instance of the DataGridColumn class.

Fields

ActualWidthProperty ActualWidthProperty ActualWidthProperty ActualWidthProperty

Identifies the ActualWidth dependency property.

CanUserReorderProperty CanUserReorderProperty CanUserReorderProperty CanUserReorderProperty

Identifies the CanUserReorder dependency property.

CanUserResizeProperty CanUserResizeProperty CanUserResizeProperty CanUserResizeProperty

Identifies the CanUserResize dependency property.

CanUserSortProperty CanUserSortProperty CanUserSortProperty CanUserSortProperty

Identifies the CanUserSort dependency property.

CellStyleProperty CellStyleProperty CellStyleProperty CellStyleProperty

Identifies the CellStyle dependency property.

DisplayIndexProperty DisplayIndexProperty DisplayIndexProperty DisplayIndexProperty

Identifies the DisplayIndex dependency property.

DragIndicatorStyleProperty DragIndicatorStyleProperty DragIndicatorStyleProperty DragIndicatorStyleProperty

Identifies the DragIndicatorStyle dependency property.

HeaderProperty HeaderProperty HeaderProperty HeaderProperty

Identifies the Header dependency property.

HeaderStringFormatProperty HeaderStringFormatProperty HeaderStringFormatProperty HeaderStringFormatProperty

Identifies the HeaderStringFormat dependency property.

HeaderStyleProperty HeaderStyleProperty HeaderStyleProperty HeaderStyleProperty

Identifies the HeaderStyle dependency property.

HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty

Identifies the HeaderTemplate dependency property.

HeaderTemplateSelectorProperty HeaderTemplateSelectorProperty HeaderTemplateSelectorProperty HeaderTemplateSelectorProperty

Identifies the HeaderTemplateSelector dependency property.

IsAutoGeneratedProperty IsAutoGeneratedProperty IsAutoGeneratedProperty IsAutoGeneratedProperty

Identifies the IsAutoGenerated dependency property.

IsFrozenProperty IsFrozenProperty IsFrozenProperty IsFrozenProperty

Identifies the IsFrozen dependency property.

IsReadOnlyProperty IsReadOnlyProperty IsReadOnlyProperty IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

MaxWidthProperty MaxWidthProperty MaxWidthProperty MaxWidthProperty

Identifies the MaxWidth dependency property.

MinWidthProperty MinWidthProperty MinWidthProperty MinWidthProperty

Identifies the MinWidth dependency property.

SortDirectionProperty SortDirectionProperty SortDirectionProperty SortDirectionProperty

Identifies the SortDirection dependency property.

SortMemberPathProperty SortMemberPathProperty SortMemberPathProperty SortMemberPathProperty

Identifies the SortMemberPath dependency property.

VisibilityProperty VisibilityProperty VisibilityProperty VisibilityProperty

Identifies the Visibility dependency property.

WidthProperty WidthProperty WidthProperty WidthProperty

Identifies the Width dependency property.

Properties

ActualWidth ActualWidth ActualWidth ActualWidth

Gets the current width of the column, in device-independent units (1/96th inch per unit).

CanUserReorder CanUserReorder CanUserReorder CanUserReorder

Gets or sets a value that indicates whether the user can change the column display position by dragging the column header.

CanUserResize CanUserResize CanUserResize CanUserResize

Gets or sets a value that indicates whether the user can adjust the column width by using the mouse.

CanUserSort CanUserSort CanUserSort CanUserSort

Gets or sets a value that indicates whether the user can sort the column by clicking the column header.

CellStyle CellStyle CellStyle CellStyle

Gets or sets the style that is used to render cells in the column.

ClipboardContentBinding ClipboardContentBinding ClipboardContentBinding ClipboardContentBinding

Gets or sets the binding object to use when getting or setting cell content for the clipboard.

DataGridOwner DataGridOwner DataGridOwner DataGridOwner

Gets the DataGrid control that contains this column.

DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType

Gets the DependencyObjectType that wraps the CLR type of this instance.

(Inherited from DependencyObject)
Dispatcher Dispatcher Dispatcher Dispatcher

Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
DisplayIndex DisplayIndex DisplayIndex DisplayIndex

Gets or sets the display position of the column relative to the other columns in the DataGrid.

DragIndicatorStyle DragIndicatorStyle DragIndicatorStyle DragIndicatorStyle

Gets or sets the style object to apply to the column header during a drag operation.

Header Header Header Header

Gets or sets the content of the column header.

HeaderStringFormat HeaderStringFormat HeaderStringFormat HeaderStringFormat

Gets or sets the format pattern to apply to the content of the column header.

HeaderStyle HeaderStyle HeaderStyle HeaderStyle

Gets or sets the style that is used when rendering the column header.

HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate

Gets or sets the template that defines the visual representation of the column header.

HeaderTemplateSelector HeaderTemplateSelector HeaderTemplateSelector HeaderTemplateSelector

Gets or sets the object that selects which template to use for the column header.

IsAutoGenerated IsAutoGenerated IsAutoGenerated IsAutoGenerated

Gets a value that indicates whether the column is auto-generated.

IsFrozen IsFrozen IsFrozen IsFrozen

Gets a value that indicates whether the column is prevented from scrolling horizontally.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets or sets a value that indicates whether cells in the column can be edited.

IsSealed IsSealed IsSealed IsSealed

Gets a value that indicates whether this instance is currently sealed (read-only).

(Inherited from DependencyObject)
MaxWidth MaxWidth MaxWidth MaxWidth

Gets or sets the maximum width constraint of the column.

MinWidth MinWidth MinWidth MinWidth

Gets or sets the minimum width constraint of the column.

SortDirection SortDirection SortDirection SortDirection

Gets or sets the sort direction (ascending or descending) of the column.

SortMemberPath SortMemberPath SortMemberPath SortMemberPath

Gets or sets a property name, or a period-delimited hierarchy of property names, that indicates the member to sort by.

Visibility Visibility Visibility Visibility

Gets or sets the visibility of the column.

Width Width Width Width

Gets or sets the column width or automatic sizing mode.

Methods

CancelCellEdit(FrameworkElement, Object) CancelCellEdit(FrameworkElement, Object) CancelCellEdit(FrameworkElement, Object) CancelCellEdit(FrameworkElement, Object)

Causes the cell being edited to revert to the original, unedited value.

CheckAccess() CheckAccess() CheckAccess() CheckAccess()

Determines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier.

(Inherited from DependencyObject)
ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey)

Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey.

(Inherited from DependencyObject)
CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty)

Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(Inherited from DependencyObject)
CommitCellEdit(FrameworkElement) CommitCellEdit(FrameworkElement) CommitCellEdit(FrameworkElement) CommitCellEdit(FrameworkElement)

Performs any required validation before exiting cell editing mode.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

(Inherited from DependencyObject)
GenerateEditingElement(DataGridCell, Object) GenerateEditingElement(DataGridCell, Object) GenerateEditingElement(DataGridCell, Object) GenerateEditingElement(DataGridCell, Object)

When overridden in a derived class, gets an editing element that is bound to the Binding property value of the column.

GenerateElement(DataGridCell, Object) GenerateElement(DataGridCell, Object) GenerateElement(DataGridCell, Object) GenerateElement(DataGridCell, Object)

When overridden in a derived class, gets a read-only element that is bound to the Binding property value of the column.

GetCellContent(DataGridRow) GetCellContent(DataGridRow) GetCellContent(DataGridRow) GetCellContent(DataGridRow)

Retrieves the Content property value for the cell at the intersection of this column and the specified row.

GetCellContent(Object) GetCellContent(Object) GetCellContent(Object) GetCellContent(Object)

Gets the Content property value for the cell at the intersection of this column and the row that represents the specified data item.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Gets a hash code for this DependencyObject.

(Inherited from DependencyObject)
GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator()

Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(Inherited from DependencyObject)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Returns the current effective value of a dependency property on this instance of a DependencyObject.

(Inherited from DependencyObject)
InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty)

Re-evaluates the effective value for the specified dependency property

(Inherited from DependencyObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
NotifyPropertyChanged(String) NotifyPropertyChanged(String) NotifyPropertyChanged(String) NotifyPropertyChanged(String)

Notifies the DataGrid that contains this column that a column property has changed.

OnCoerceIsReadOnly(Boolean) OnCoerceIsReadOnly(Boolean) OnCoerceIsReadOnly(Boolean) OnCoerceIsReadOnly(Boolean)

Determines the value of the IsReadOnly property based on the property rules of the DataGrid that contains this column.

OnCopyingCellClipboardContent(Object) OnCopyingCellClipboardContent(Object) OnCopyingCellClipboardContent(Object) OnCopyingCellClipboardContent(Object)

Raises the CopyingCellClipboardContent event.

OnPastingCellClipboardContent(Object, Object) OnPastingCellClipboardContent(Object, Object) OnPastingCellClipboardContent(Object, Object) OnPastingCellClipboardContent(Object, Object)

Raises the PastingCellClipboardContent event.

OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs)

Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data.

(Inherited from DependencyObject)
PrepareCellForEdit(FrameworkElement, RoutedEventArgs) PrepareCellForEdit(FrameworkElement, RoutedEventArgs) PrepareCellForEdit(FrameworkElement, RoutedEventArgs) PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

When overridden in a derived class, sets cell content as needed for editing.

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if it exists.

(Inherited from DependencyObject)
RefreshCellContent(FrameworkElement, String) RefreshCellContent(FrameworkElement, String) RefreshCellContent(FrameworkElement, String) RefreshCellContent(FrameworkElement, String)

When overridden in a derived class, updates the contents of a cell in the column in response to a column property value that changed.

SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object)

Sets the value of a dependency property without changing its value source.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object)

Sets the local value of a dependency property, specified by its dependency property identifier.

(Inherited from DependencyObject)
SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object)

Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(Inherited from DependencyObject)
ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty)

Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(Inherited from DependencyObject)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

Events

CopyingCellClipboardContent CopyingCellClipboardContent CopyingCellClipboardContent CopyingCellClipboardContent

Occurs after the cell clipboard content is prepared.

PastingCellClipboardContent PastingCellClipboardContent PastingCellClipboardContent PastingCellClipboardContent

Occurs before the clipboard content is moved to the cell.

Applies to

See Also