ClassDataGridColumn
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.
Definition
Namespace:Telerik.UI.Xaml.Controls.Grid
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public abstract class DataGridColumn : RadDependencyObject
Inheritance: objectRadDependencyObjectDataGridColumn
Derived Classes:
Constructors
DataGridColumn()
Initializes a new instance of the DataGridColumn class.
Declaration
protected DataGridColumn()
Fields
AggregatesTemplateProperty
Identifies the AggregatesTemplate dependency property.
Declaration
public static readonly DependencyProperty AggregatesTemplateProperty
Field Value
DependencyProperty
CanUserEditProperty
Identifies the CanUserEdit dependency property.
Declaration
public static readonly DependencyProperty CanUserEditProperty
Field Value
DependencyProperty
CanUserFilterProperty
Identifies the CanUserFilter dependency property.
Declaration
public static readonly DependencyProperty CanUserFilterProperty
Field Value
DependencyProperty
CanUserGroupProperty
Identifies the CanUserGroup dependency property.
Declaration
public static readonly DependencyProperty CanUserGroupProperty
Field Value
DependencyProperty
CanUserReorderProperty
Identifies the CanUserReorder dependency property.
Declaration
public static readonly DependencyProperty CanUserReorderProperty
Field Value
DependencyProperty
CanUserResizeProperty
Identifies the CanUserResize dependency property.
Declaration
public static readonly DependencyProperty CanUserResizeProperty
Field Value
DependencyProperty
CanUserSortProperty
Identifies the CanUserSort dependency property.
Declaration
public static readonly DependencyProperty CanUserSortProperty
Field Value
DependencyProperty
CellDecorationStyleProperty
Identifies the CellDecorationStyle dependency property.
Declaration
public static readonly DependencyProperty CellDecorationStyleProperty
Field Value
DependencyProperty
CellDecorationStyleSelectorProperty
Identifies the CellDecorationStyleSelector dependency property.
Declaration
public static readonly DependencyProperty CellDecorationStyleSelectorProperty
Field Value
DependencyProperty
DataOperationsFlyoutTemplateProperty
Identifies the DataOperationsFlyoutTemplate dependency property.
Declaration
public static readonly DependencyProperty DataOperationsFlyoutTemplateProperty
Field Value
DependencyProperty
HeaderProperty
Identifies the Header dependency property.
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
DependencyProperty
HeaderStyleProperty
Identifies the HeaderStyle dependency property.
Declaration
public static readonly DependencyProperty HeaderStyleProperty
Field Value
DependencyProperty
IsCellFlyoutEnabledProperty
Identifies the IsCellFlyoutEnabled dependency property.
Declaration
public static readonly DependencyProperty IsCellFlyoutEnabledProperty
Field Value
DependencyProperty
IsVisibleProperty
Identifies the IsVisible dependency property.
Declaration
public static readonly DependencyProperty IsVisibleProperty
Field Value
DependencyProperty
NameProperty
Identifies the Name dependency property.
Declaration
public static readonly DependencyProperty NameProperty
Field Value
DependencyProperty
SizeModeProperty
Identifies the SizeMode dependency property.
Declaration
public static readonly DependencyProperty SizeModeProperty
Field Value
DependencyProperty
SortDirectionProperty
Identifies the SortDirection dependency property.
Declaration
public static readonly DependencyProperty SortDirectionProperty
Field Value
DependencyProperty
WidthProperty
Identifies the Width dependency property.
Declaration
public static readonly DependencyProperty WidthProperty
Field Value
DependencyProperty
Properties
ActualWidth
Gets the actual width of the column.
AggregatesTemplate
Gets or sets the template used to show aggregates
Declaration
public DataTemplate AggregatesTemplate { get; set; }
Property Value
DataTemplate
CanUserEdit
Gets or sets a value indicating whether the user can edit this column.
Declaration
public bool CanUserEdit { get; set; }
Property Value
The default value is "true".
Remarks
To enable/disable editing in RadDataGrid see the
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
The default value is "true".
Remarks
To enable/disable Filtering in RadDataGrid see the
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
The default value is "true".
Remarks
To enable/disable grouping in RadDataGrid see the .
CanUserReorder
Gets or sets a value indicating whether the user can reorder the column.
Declaration
public bool CanUserReorder { get; set; }
Property Value
The default value is "true".
Remarks
To enable/disable column reordering see the
CanUserResize
Gets or sets a value indicating whether the user can resize this column.
Declaration
public bool CanUserResize { get; set; }
Property Value
The default value is "true".
Remarks
To enable/disable editing in RadDataGrid see the
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
The default value is "true".
Remarks
To enable/disable sorting in RadDataGrid see the .
CellDecorationStyle
Gets or sets the Style object that defines the background of each cell associated with this column. The TargetType property of the Style object is .
Declaration
public Style CellDecorationStyle { get; set; }
Property Value
Style
CellDecorationStyleSelector
Gets or sets the StyleSelector instance that allows for dynamic decoration on a per cell basis.
Declaration
public StyleSelector CellDecorationStyleSelector { get; set; }
Property Value
StyleSelector
DataOperationsFlyoutTemplate
Gets or sets the DataTemplate for the DataOperations' flyout.
Declaration
public DataTemplate DataOperationsFlyoutTemplate { get; set; }
Property Value
DataTemplate
Header
Gets or sets the content to be displayed in the Header UI that represents the column.
HeaderStyle
Gets or sets the Style instance that defines the appearance of the DataGridColumnHeader control.
Declaration
public Style HeaderStyle { get; set; }
Property Value
Style
IsAutoGenerated
Gets a value indicating whether the column is auto-generated internally.
IsCellFlyoutEnabled
Gets or sets a value indicating whether a flyout will be shown over a cell after holding.
IsVisible
Gets or sets a value indicating whether if the current column is visible or not.
Name
Gets or sets the unique name of the column. Typically this is used as an identifier for this particular instance.
Declaration
public string Name { get; set; }
Property Value
Example
<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
SortDirection
Gets or sets the current SortDirection value for the column. This property is used for visualization purposes only and does not affect the actual sorting state of the owning RadDataGrid component.
Declaration
public SortDirection SortDirection { get; set; }
Property Value
SupportsCompositeFilter
When overriden in an inherited column gets a value whether this column shows two filter controls in its filtering flyout.
Declaration
protected virtual bool SupportsCompositeFilter { get; }
Property Value
Methods
ClearCell(object)
Clears the bindings, data etc. of the control visualized by the cell when it is not edited.
Declaration
public virtual void ClearCell(object container)
Parameters
container
The container visualizing the cell data when it is not edited.
CreateContainer(object)
Creates an instance of the control visualized when the column is not edited.
CreateDecorationContainer(object)
Creates a FrameworkElement instance that will be used as a decoration container for the cell represented by the specified row item and the current column instance.
Declaration
protected virtual FrameworkElement CreateDecorationContainer(object rowItem)
Parameters
rowItem
The row item the cell belongs to.
Returns
FrameworkElement
CreateFilterControl()
Creates the appropriate DataGridFilterControlBase instance that allows filtering operation to be applied upon this column.
Declaration
protected abstract DataGridFilterControlBase CreateFilterControl()
Returns
GetContainerType(object)
Gets the type of the control visualized when the cell is not currently edited.
GetEditorType(object)
Gets the type of the editor that is visualized when entering in edit mode.
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.
PrepareCell(object, object, object)
Prepares the control visualized by the cell when it is not edited.
UpdateFilterVisualState(bool)
Method that updates the VisualState of the Header after filtering.
Declaration
public void UpdateFilterVisualState(bool isFiltered)
Parameters
isFiltered