Show / Hide Table of Contents

Class DataGridCheckBoxColumn

Represents a DataGrid column that hosts CheckBox controls in its cells.

Inheritance
System.Object
DependencyObject
DataGridColumn
DataGridBoundColumn
DataGridCheckBoxColumn
Inherited Members
DataGridBoundColumn.Binding
DataGridBoundColumn.ClipboardContentBinding
DataGridBoundColumn.EditingElementStyle
DataGridBoundColumn.ElementStyle
DataGridColumn.ActualWidth
DataGridColumn.CellStyle
DataGridColumn.CanUserReorder
DataGridColumn.CanUserResize
DataGridColumn.CanUserSort
DataGridColumn.DisplayIndex
DataGridColumn.DragIndicatorStyle
DataGridColumn.HeaderStyle
DataGridColumn.Header
DataGridColumn.IsAutoGenerated
DataGridColumn.IsFrozen
DataGridColumn.IsReadOnly
DataGridColumn.MaxWidth
DataGridColumn.MinWidth
DataGridColumn.SortMemberPath
DataGridColumn.Visibility
DataGridColumn.Width
DataGridColumn.GetCellContent(DataGridRow)
DataGridColumn.GetCellContent(Object)
DataGridColumn.GetColumnContainingElement(FrameworkElement)
DataGridColumn.NotifyPropertyChanged(String)
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Data.dll
Syntax
[StyleTypedProperty(Property = "ElementStyle", StyleTargetType = typeof(CheckBox))]
[StyleTypedProperty(Property = "EditingElementStyle", StyleTargetType = typeof(CheckBox))]
public class DataGridCheckBoxColumn : DataGridBoundColumn, IDependencyObject

Constructors

| Improve this Doc View Source

DataGridCheckBoxColumn()

Initializes a new instance of the DataGridCheckBoxColumn class.

Declaration
public DataGridCheckBoxColumn()

Properties

| Improve this Doc View Source

IsThreeState

Gets or sets a value that indicates whether the hosted CheckBox controls allow three states or two.

Declaration
public bool IsThreeState { get; set; }
Property Value
Type Description
System.Boolean

true if the hosted controls support three states; false if they support two states. The default is false.

Methods

| Improve this Doc View Source

CancelCellEdit(FrameworkElement, Object)

Causes the column cell being edited to revert to the specified value.

Declaration
protected override void CancelCellEdit(FrameworkElement editingElement, object uneditedValue)
Parameters
Type Name Description
FrameworkElement editingElement

The element that the column displays for a cell in editing mode.

System.Object uneditedValue

The previous, unedited value in the cell being edited.

Overrides
DataGridColumn.CancelCellEdit(FrameworkElement, Object)
| Improve this Doc View Source

GenerateEditingElement(DataGridCell, Object)

Gets a CheckBox control that is bound to the column's Binding property value.

Declaration
protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
Parameters
Type Name Description
DataGridCell cell

The cell that will contain the generated element.

System.Object dataItem

The data item represented by the row that contains the intended cell.

Returns
Type Description
FrameworkElement

A new CheckBox control that is bound to the column's Binding property value.

Overrides
DataGridColumn.GenerateEditingElement(DataGridCell, Object)
| Improve this Doc View Source

GenerateElement(DataGridCell, Object)

Gets a read-only CheckBox control that is bound to the column's Binding property value.

Declaration
protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem)
Parameters
Type Name Description
DataGridCell cell

The cell that will contain the generated element.

System.Object dataItem

The data item represented by the row that contains the intended cell.

Returns
Type Description
FrameworkElement

A new, read-only CheckBox control that is bound to the column's Binding property value.

Overrides
DataGridColumn.GenerateElement(DataGridCell, Object)
| Improve this Doc View Source

PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

Called when a cell in the column enters editing mode.

Declaration
protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)
Parameters
Type Name Description
FrameworkElement editingElement

The element that the column displays for a cell in editing mode.

RoutedEventArgs editingEventArgs

Information about the user gesture that is causing a cell to enter editing mode.

Returns
Type Description
System.Object

The unedited value.

Overrides
DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs)
| Improve this Doc View Source

RefreshCellContent(FrameworkElement, String)

Called by the DataGrid control when this column asks for its elements to be updated, because its CheckBoxContent or IsThreeState property changed.

Declaration
protected override void RefreshCellContent(FrameworkElement element, string propertyName)
Parameters
Type Name Description
FrameworkElement element
System.String propertyName
Overrides
DataGridColumn.RefreshCellContent(FrameworkElement, String)

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source