Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataGrid Events

The DataGrid type exposes the following members.

  Name Description
Public event AutoGeneratingColumn Occurs one time for each public, non-static property in the bound data type when the ItemsSource property is changed and the AutoGenerateColumns property is true.
Public event BeginningEdit Occurs before a cell or row enters editing mode.
Public event BindingValidationError Occurs when a data validation error is reported by a binding source. (Inherited from FrameworkElement.)
Public event CellEditEnded Occurs when a cell edit has been committed or canceled.
Public event CellEditEnding Occurs when a cell edit is ending.
Public event ColumnDisplayIndexChanged Occurs when the DisplayIndex property of a column changes.
Public event ColumnHeaderDragCompleted Occurs when the user drops a column header that was being dragged using the mouse.
Public event ColumnHeaderDragDelta Occurs one or more times while the user drags a column header using the mouse.
Public event ColumnHeaderDragStarted Occurs when the user begins dragging a column header using the mouse.
Public event ColumnReordered Occurs when a DataGrid column has moved to a new position in the display order.
Public event ColumnReordering Occurs before a DataGrid column moves to a new position in the display order.
Public event CopyingRowClipboardContent Occurs when the row is prepared for a clipboard copy operation.
Public event CurrentCellChanged Occurs when a different cell becomes the current cell.
Public event DataContextChanged Occurs when the data context for this element changes. (Inherited from FrameworkElement.)
Public event DragEnter Occurs when the input system reports an underlying drag event with this element as the target. (Inherited from UIElement.)
Public event DragLeave Occurs when the input system reports an underlying drag event with this element as the origin. (Inherited from UIElement.)
Public event DragOver Occurs when the input system reports an underlying drag event with this element as the potential drop target. (Inherited from UIElement.)
Public event Drop Occurs when the input system reports an underlying drop event with this element as the drop target. (Inherited from UIElement.)
Public event GotFocus Occurs when a UIElement receives focus. (Inherited from UIElement.)
Public event IsEnabledChanged Occurs when the IsEnabled property changes. (Inherited from Control.)
Public event KeyDown Occurs when a keyboard key is pressed while the UIElement has focus. (Inherited from UIElement.)
Public event KeyUp Occurs when a keyboard key is released while the UIElement has focus. (Inherited from UIElement.)
Public event LayoutUpdated Occurs when the layout of the Silverlight visual tree changes. (Inherited from FrameworkElement.)
Public event Loaded Occurs when a FrameworkElement has been constructed and added to the object tree. (Inherited from FrameworkElement.)
Public event LoadingRow Occurs after a DataGridRow is instantiated, so that you can customize it before it is used.
Public event LoadingRowDetails Occurs when a new row details template is applied to a row, so that you can customize the details section before it is used.
Public event LoadingRowGroup Occurs when a row group header is loading, so that you can customize the header before it is used.
Public event LostFocus Occurs when a UIElement loses focus. (Inherited from UIElement.)
Public event LostMouseCapture Occurs when the UIElement loses mouse capture. (Inherited from UIElement.)
Public event MediaCommand Occurs when a button is pressed on a remote control. (Inherited from UIElement.)
Public event MouseEnter Occurs when the mouse (or a stylus) enters the bounding area of a UIElement. (Inherited from UIElement.)
Public event MouseLeave Occurs when the mouse (or the stylus) leaves the bounding area of a UIElement. (Inherited from UIElement.)
Public event MouseLeftButtonDown Occurs when the left mouse button is pressed (or when the tip of the stylus touches the tablet) while the mouse pointer is over a UIElement. (Inherited from UIElement.)
Public event MouseLeftButtonUp Occurs when the left mouse button is released (or the tip of the stylus is removed from the tablet) while the mouse (or the stylus) is over a UIElement (or while a UIElement holds mouse capture). (Inherited from UIElement.)
Public event MouseMove Occurs when the coordinate position of the mouse (or stylus) changes while over a UIElement (or while a UIElement holds mouse capture). (Inherited from UIElement.)
Public event MouseRightButtonDown Occurs when the right mouse button is pressed while the mouse pointer is over a UIElement. (Inherited from UIElement.)
Public event MouseRightButtonUp Occurs when the right mouse button is released while the mouse pointer is over a UIElement. However, this event will only be raised if a caller marks the preceding MouseRightButtonDown event as handled; see Remarks. (Inherited from UIElement.)
Public event MouseWheel Occurs when the user rotates the mouse wheel while the mouse pointer is over a UIElement, or the UIElement has focus. (Inherited from UIElement.)
Public event PreparingCellForEdit Occurs when a cell in a DataGridTemplateColumn enters editing mode.
Public event RowDetailsVisibilityChanged Occurs when the RowDetailsVisibilityMode property value changes.
Public event RowEditEnded Occurs when a row edit has been committed or canceled.
Public event RowEditEnding Occurs when a row edit is ending.
Public event SelectionChanged Occurs when the SelectedItem or SelectedItems property value changes.
Public event SizeChanged Occurs when either the ActualHeight or the ActualWidth properties change value on a FrameworkElement. (Inherited from FrameworkElement.)
Public event TextInput Occurs when a UI element gets text in a device-independent manner. (Inherited from UIElement.)
Public event TextInputStart Occurs when a UI element initially gets text in a device-independent manner. (Inherited from UIElement.)
Public event TextInputUpdate Occurs when text continues to be composed via an input method editor (IME). (Inherited from UIElement.)
Public event Unloaded Occurs when this object is no longer connected to the main object tree. (Inherited from FrameworkElement.)
Public event UnloadingRow Occurs when a DataGridRow object becomes available for reuse.
Public event UnloadingRowDetails Occurs when a row details element becomes available for reuse.
Public event UnloadingRowGroup Occurs when a row group is unloading.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft