DataGridColumn Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a DataGrid column.
[Windows.UI.Xaml.StyleTypedProperty(Property="CellStyle", StyleTargetType=typeof(Microsoft.Toolkit.Uwp.UI.Controls.DataGridCell))]
[Windows.UI.Xaml.StyleTypedProperty(Property="DragIndicatorStyle", StyleTargetType=typeof(Windows.UI.Xaml.Controls.ContentControl))]
[Windows.UI.Xaml.StyleTypedProperty(Property="HeaderStyle", StyleTargetType=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.DataGridColumnHeader))]
public abstract class DataGridColumn : Windows.UI.Xaml.DependencyObject
[<Windows.UI.Xaml.StyleTypedProperty(Property="CellStyle", StyleTargetType=typeof(Microsoft.Toolkit.Uwp.UI.Controls.DataGridCell))>]
[<Windows.UI.Xaml.StyleTypedProperty(Property="DragIndicatorStyle", StyleTargetType=typeof(Windows.UI.Xaml.Controls.ContentControl))>]
[<Windows.UI.Xaml.StyleTypedProperty(Property="HeaderStyle", StyleTargetType=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.DataGridColumnHeader))>]
type DataGridColumn = class
inherit DependencyObject
Public MustInherit Class DataGridColumn
Inherits DependencyObject
- Inheritance
-
Windows.UI.Xaml.DependencyObjectDataGridColumn
- Derived
- Attributes
-
Windows.UI.Xaml.StyleTypedPropertyAttribute
Constructors
DataGridColumn() |
Initializes a new instance of the DataGridColumn class. |
Properties
ActualWidth |
Gets the actual visible width after Width, MinWidth, and MaxWidth setting at the Column level and DataGrid level have been taken into account. |
CanUserReorder |
Gets or sets a value indicating whether the user can change the column display position by dragging the column header. |
CanUserResize |
Gets or sets a value indicating whether the user can adjust the column width using the mouse. |
CanUserSort |
Gets or sets a value indicating whether the user can sort the column by clicking the column header. |
CellStyle |
Gets or sets the style that is used when rendering cells in the column. |
ClipboardContentBinding |
Gets or sets the binding that will be used to get or set cell content for the clipboard. |
DisplayIndex |
Gets or sets the display position of the column relative to the other columns in the DataGrid. |
DragIndicatorStyle |
Gets or sets the style for the drag indicator. |
Header |
Gets or sets the header object. |
HeaderStyle |
Gets or sets the style for the header. |
IsAutoGenerated |
Gets a value indicating whether this column is autoGenerated. |
IsFrozen |
Gets a value indicating whether this column is frozen. |
IsReadOnly |
Gets or sets a value indicating whether this column is read-only. |
MaxWidth |
Gets or sets the column's maximum width. |
MinWidth |
Gets or sets the column's minimum width. |
SortDirection |
Gets or sets the column's sort direction. Null indicates no sorting. |
Tag |
Gets or sets an object associated with this column. |
Visibility |
Gets or sets the column's visibility. |
Width |
Gets or sets the column's width. |
Methods
CancelCellEdit(FrameworkElement, Object) |
When overridden in a derived class, causes the column cell being edited to revert to the unedited value. |
GenerateEditingElement(DataGridCell, Object) |
When overridden in a derived class, gets an editing element that is bound to the column's Binding property value. |
GenerateElement(DataGridCell, Object) |
When overridden in a derived class, gets a read-only element that is bound to the column's Binding property value. |
GetCellContent(DataGridRow) |
Returns the column's content for the provided row. |
GetCellContent(Object) |
Returns the column's content for the provided row dataItem. |
GetColumnContainingElement(FrameworkElement) |
Returns the column which contains the given element |
NotifyPropertyChanged(String) |
Called by a specific column type when one of its properties changed, and its current cells need to be updated. |
PrepareCellForEdit(FrameworkElement, RoutedEventArgs) |
When overridden in a derived class, called when a cell in the column enters editing mode. |
RefreshCellContent(FrameworkElement, Brush, String) |
Called by the DataGrid control when a column asked for its elements to be refreshed, typically because one of its properties changed. |
RefreshForeground(FrameworkElement, Brush) |
Called when the computed foreground of a row changed. |