Skip to main content

DataGrid Events

Events

ActualThemeVariantChangedRaised when the theme variant is changed on the element or an ancestor of the element.
(Inherited from StyledElement)
AttachedToLogicalTreeRaised when the styled element is attached to a rooted logical tree.
(Inherited from StyledElement)
AttachedToVisualTreeRaised when the control is attached to a rooted visual tree.
(Inherited from Visual)
AutoGeneratingColumnOccurs 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.
BeginningEditOccurs before a cell or row enters editing mode.
CellEditEndedOccurs after cell editing has ended.
CellEditEndingOccurs immediately before cell editing has ended.
CellPointerPressedOccurs when cell is mouse-pressed.
ColumnDisplayIndexChangedOccurs when the DisplayIndex property of a column changes.
ColumnReorderedRaised when column reordering ends, to allow subscribers to clean up.
ColumnReorderingRaised when starting a column reordering action. Subscribers to this event can set tooltip and caret UIElements, constrain tooltip position, indicate that a preview should be shown, or cancel reordering.
ContextRequestedOccurs when the user has completed a context input gesture, such as a right-click.
(Inherited from Control)
CopyingRowClipboardContentThis event is raised by OnCopyingRowClipboardContent method after the default row content is prepared. Event listeners can modify or add to the row clipboard content.
CurrentCellChangedOccurs when a different cell becomes the current cell.
DataContextChangedOccurs when the DataContext property changes.
(Inherited from StyledElement)
DetachedFromLogicalTreeRaised when the styled element is detached from a rooted logical tree.
(Inherited from StyledElement)
DetachedFromVisualTreeRaised when the control is detached from a rooted visual tree.
(Inherited from Visual)
DoubleTappedOccurs when a double-tap gesture occurs on the control.
(Inherited from InputElement)
EffectiveViewportChangedOccurs when the element's effective viewport changes.
(Inherited from Layoutable)
GotFocusOccurs when the control receives focus.
(Inherited from InputElement)
HoldingOccurs when a hold gesture occurs on the control.
(Inherited from InputElement)
HorizontalScroll 
InitializedOccurs when the styled element has finished initialization.
(Inherited from StyledElement)
KeyDownOccurs when a key is pressed while the control has focus.
(Inherited from InputElement)
KeyUpOccurs when a key is released while the control has focus.
(Inherited from InputElement)
LayoutUpdatedOccurs when a layout pass completes for the control.
(Inherited from Layoutable)
LoadedOccurs when the control has been fully constructed in the visual tree and both layout and render are complete.
(Inherited from Control)
LoadingRowOccurs after a DataGridRow is instantiated, so that you can customize it before it is used.
LoadingRowDetailsOccurs when a new row details template is applied to a row, so that you can customize the details section before it is used.
LoadingRowGroupOccurs before a DataGridRowGroupHeader header is used.
LostFocusOccurs when the control loses focus.
(Inherited from InputElement)
PointerCaptureLostOccurs when the control or its child control loses the pointer capture for any reason, event will not be triggered for a parent control if capture was transferred to another child of that parent control
(Inherited from InputElement)
PointerEnteredOccurs when the pointer enters the control.
(Inherited from InputElement)
PointerExitedOccurs when the pointer leaves the control.
(Inherited from InputElement)
PointerMovedOccurs when the pointer moves over the control.
(Inherited from InputElement)
PointerPressedOccurs when the pointer is pressed over the control.
(Inherited from InputElement)
PointerReleasedOccurs when the pointer is released over the control.
(Inherited from InputElement)
PointerWheelChangedOccurs when the mouse is scrolled over the control.
(Inherited from InputElement)
PreparingCellForEditOccurs when a cell in a DataGridTemplateColumn enters editing mode.
PropertyChangedRaised when a AvaloniaProperty value changes on this object.
(Inherited from AvaloniaObject)
ResourcesChangedOccurs when a resource in this styled element or a parent styled element has changed.
(Inherited from StyledElement)
RowDetailsVisibilityChangedOccurs when the RowDetailsVisibilityMode property value changes.
RowEditEndedOccurs when the row has been successfully committed or cancelled.
RowEditEndingOccurs immediately before the row has been successfully committed or cancelled.
SelectionChangedOccurs when the SelectedItem or SelectedItems property value changes.
SizeChangedOccurs when the bounds (actual size) of the control have changed.
(Inherited from Control)
SortingOccurs when the DataGridColumn sorting request is triggered.
TappedOccurs when a tap gesture occurs on the control.
(Inherited from InputElement)
TemplateAppliedRaised when the control's template is applied.
(Inherited from TemplatedControl)
TextInputOccurs when a user typed some text while the control has focus.
(Inherited from InputElement)
TextInputMethodClientRequestedOccurs when an input element gains input focus and input method is looking for the corresponding client
(Inherited from InputElement)
UnloadedOccurs when the control is removed from the visual tree.
(Inherited from Control)
UnloadingRowOccurs when a DataGridRow object becomes available for reuse.
UnloadingRowDetailsOccurs when a row details element becomes available for reuse.
UnloadingRowGroupOccurs when the DataGridRowGroupHeader is available for reuse.
VerticalScroll 

See Also

Reference

DataGrid Class
Avalonia.Controls Namespace