DataGridColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs) Method

Definition

When overridden in a derived class, sets cell content as needed for editing.

C#
protected virtual object PrepareCellForEdit(System.Windows.FrameworkElement editingElement, System.Windows.RoutedEventArgs editingEventArgs);

Parameters

editingElement
FrameworkElement

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

editingEventArgs
RoutedEventArgs

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

Returns

When returned by a derived class, the unedited cell value. This implementation returns null in all cases.

Remarks

Derived column types override this method to respond to the user gesture that is indicated by editingEventArgs and to return the current value before editing.

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also