Partager via


DataGrid.PreparingCellForEdit Event

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Occurs when a cell in a DataGridTemplateColumn enters editing mode.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data (in System.Windows.Controls.Data.dll)

Syntax

'Declaration
Public Event PreparingCellForEdit As EventHandler(Of DataGridPreparingCellForEditEventArgs)
public event EventHandler<DataGridPreparingCellForEditEventArgs> PreparingCellForEdit
<sdk:DataGrid PreparingCellForEdit="eventhandler"/>

Remarks

You can handle this event to respond to a user who is attempting to edit a cell in a DataGridTemplateColumn. This event does not occur for cells in other column types. If the user attempts to edit a cell in other columns derived from DataGridColumn, the DataGrid control calls the column's PrepareCellForEdit method.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.