Class DataGridCheckBoxColumn
Inheritance
Inherited Members
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
Constructors
| Improve this Doc View SourceDataGridCheckBoxColumn()
Initializes a new instance of the DataGridCheckBoxColumn class.
Declaration
public DataGridCheckBoxColumn()
Properties
| Improve this Doc View SourceIsThreeState
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 SourceCancelCellEdit(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
| Improve this Doc View SourceGenerateEditingElement(DataGridCell, Object)
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
| Improve this Doc View SourceGenerateElement(DataGridCell, Object)
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
| Improve this Doc View SourcePrepareCellForEdit(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
| Improve this Doc View SourceRefreshCellContent(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 |