Class DataGridTemplateColumn
Represents a Data
Inherited Members
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Data.dll
Syntax
public class DataGridTemplateColumn : DataGridColumn, IDependencyObject
Constructors
| Improve this Doc View SourceDataGridTemplateColumn()
Initializes a new instance of the Data
Declaration
public DataGridTemplateColumn()
Properties
| Improve this Doc View SourceCellEditingTemplate
Gets or sets the template that is used to display the contents of a cell that is in editing mode.
Declaration
public DataTemplate CellEditingTemplate { get; set; }
Property Value
Type | Description |
---|---|
Data |
CellTemplate
Gets or sets the template that is used to display the contents of a cell that is not in editing mode.
Declaration
public DataTemplate CellTemplate { get; set; }
Property Value
Type | Description |
---|---|
Data |
Methods
| Improve this Doc View SourceCancelCellEdit(FrameworkElement, Object)
Ends the edit on a data grid cell and reverts any changes.
Declaration
protected override void CancelCellEdit(FrameworkElement editingElement, object uneditedValue)
Parameters
Type | Name | Description |
---|---|---|
Framework |
editingElement | The element that the column displays for a cell in editing mode. |
System. |
uneditedValue | The value of the data prior to the edit. |
Overrides
| Improve this Doc View SourceGenerateEditingElement(DataGridCell, Object)
Gets an element defined by the Cell
Declaration
protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
Parameters
Type | Name | Description |
---|---|---|
Data |
cell | The cell that will contain the generated element. |
System. |
dataItem | The data item represented by the row that contains the intended cell. |
Returns
Type | Description |
---|---|
Framework |
A new editing element that is bound to the column's Binding property value. |
Overrides
Exceptions
Type | Condition |
---|---|
System. |
The Cell |
GenerateElement(DataGridCell, Object)
Gets an element defined by the Cell
Declaration
protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem)
Parameters
Type | Name | Description |
---|---|---|
Data |
cell | The cell that will contain the generated element. |
System. |
dataItem | The data item represented by the row that contains the intended cell. |
Returns
Type | Description |
---|---|
Framework |
A new, read-only element that is bound to the column's Binding property value. |
Overrides
Exceptions
Type | Condition |
---|---|
System. |
The Cell |
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 |
---|---|---|
Framework |
editingElement | The element that the column displays for a cell in editing mode. |
Routed |
editingEventArgs | Information about the user gesture that is causing a cell to enter editing mode. |
Returns
Type | Description |
---|---|
System. |
null in all cases. |