DataGridView Events
TOC
Collapse the table of content
Expand the table of content

DataGridView Events

 

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

NameDescription
System_CAPS_pubeventAllowUserToAddRowsChanged

Occurs when the value of the AllowUserToAddRows property changes.

System_CAPS_pubeventAllowUserToDeleteRowsChanged

Occurs when the value of the AllowUserToDeleteRowsChanged property changes.

System_CAPS_pubeventAllowUserToOrderColumnsChanged

Occurs when the value of the AllowUserToOrderColumns property changes.

System_CAPS_pubeventAllowUserToResizeColumnsChanged

Occurs when the value of the AllowUserToResizeColumns property changes.

System_CAPS_pubeventAllowUserToResizeRowsChanged

Occurs when the value of the AllowUserToResizeRows property changes.

System_CAPS_pubeventAlternatingRowsDefaultCellStyleChanged

Occurs when the value of the AlternatingRowsDefaultCellStyle property changes.

System_CAPS_pubeventAutoGenerateColumnsChanged

Occurs when the value of the AutoGenerateColumnsChanged property changes.

System_CAPS_pubeventAutoSizeChanged

This API supports the product infrastructure and is not intended to be used directly from your code. This event is not relevant for this class.(Inherited from Control.)

System_CAPS_pubeventAutoSizeColumnModeChanged

Occurs when the value of the AutoSizeMode property of a column changes.

System_CAPS_pubeventAutoSizeColumnsModeChanged

Occurs when the value of the AutoSizeColumnsMode property changes.

System_CAPS_pubeventAutoSizeRowsModeChanged

Occurs when the value of the DataGridViewAutoSizeRowsMode property changes.

System_CAPS_pubeventBackColorChanged

This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the value of the BackColor property changes.

System_CAPS_pubeventBackgroundColorChanged

Occurs when the value of the BackgroundColor property changes.

System_CAPS_pubeventBackgroundImageChanged

This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the value of the BackgroundImage property changes.

System_CAPS_pubeventBackgroundImageLayoutChanged

This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the BackgroundImageLayout property changes.

System_CAPS_pubeventBindingContextChanged

Occurs when the value of the BindingContext property changes.(Inherited from Control.)

System_CAPS_pubeventBorderStyleChanged

Occurs when the value of the BorderStyle property changes.

System_CAPS_pubeventCancelRowEdit

Occurs when the VirtualMode property of a DataGridView control is true and the cancels edits in a row.

System_CAPS_pubeventCausesValidationChanged

Occurs when the value of the CausesValidation property changes.(Inherited from Control.)

System_CAPS_pubeventCellBeginEdit

Occurs when edit mode starts for the selected cell.

System_CAPS_pubeventCellBorderStyleChanged

Occurs when the border style of a cell changes.

System_CAPS_pubeventCellClick

Occurs when any part of a cell is clicked.

System_CAPS_pubeventCellContentClick

Occurs when the content within a cell is clicked.

System_CAPS_pubeventCellContentDoubleClick

Occurs when the user double-clicks a cell's contents.

System_CAPS_pubeventCellContextMenuStripChanged

Occurs when the ContextMenuStrip property changes.

System_CAPS_pubeventCellContextMenuStripNeeded

Occurs when a cell's shortcut menu is needed.

System_CAPS_pubeventCellDoubleClick

Occurs when the user double-clicks anywhere in a cell.

System_CAPS_pubeventCellEndEdit

Occurs when edit mode stops for the currently selected cell.

System_CAPS_pubeventCellEnter

Occurs when the current cell changes in the DataGridView control or when the control receives input focus.

System_CAPS_pubeventCellErrorTextChanged

Occurs when the value of the ErrorText property of a cell changes.

System_CAPS_pubeventCellErrorTextNeeded

Occurs when a cell's error text is needed.

System_CAPS_pubeventCellFormatting

Occurs when the contents of a cell need to be formatted for display.

System_CAPS_pubeventCellLeave

Occurs when a cell loses input focus and is no longer the current cell.

System_CAPS_pubeventCellMouseClick

Occurs whenever the user clicks anywhere on a cell with the mouse.

System_CAPS_pubeventCellMouseDoubleClick

Occurs when a cell within the DataGridView is double-clicked.

System_CAPS_pubeventCellMouseDown

Occurs when the user presses a mouse button while the mouse pointer is within the boundaries of a cell.

System_CAPS_pubeventCellMouseEnter

Occurs when the mouse pointer enters a cell.

System_CAPS_pubeventCellMouseLeave

Occurs when the mouse pointer leaves a cell.

System_CAPS_pubeventCellMouseMove

Occurs when the mouse pointer moves over the DataGridView control.

System_CAPS_pubeventCellMouseUp

Occurs when the user releases a mouse button while over a cell.

System_CAPS_pubeventCellPainting

Occurs when a cell needs to be drawn.

System_CAPS_pubeventCellParsing

Occurs when a cell leaves edit mode if the cell value has been modified.

System_CAPS_pubeventCellStateChanged

Occurs when a cell state changes, such as when the cell loses or gains focus.

System_CAPS_pubeventCellStyleChanged

Occurs when the Style property of a DataGridViewCell changes.

System_CAPS_pubeventCellStyleContentChanged

Occurs when one of the values of a cell style changes.

System_CAPS_pubeventCellToolTipTextChanged

Occurs when the ToolTipText property value changes for a cell in the DataGridView.

System_CAPS_pubeventCellToolTipTextNeeded

Occurs when a cell's ToolTip text is needed.

System_CAPS_pubeventCellValidated

Occurs after the cell has finished validating.

System_CAPS_pubeventCellValidating

Occurs when a cell loses input focus, enabling content validation.

System_CAPS_pubeventCellValueChanged

Occurs when the value of a cell changes.

System_CAPS_pubeventCellValueNeeded

Occurs when the VirtualMode property of the DataGridView control is true and the DataGridView requires a value for a cell in order to format and display the cell.

System_CAPS_pubeventCellValuePushed

Occurs when the VirtualMode property of the DataGridView control is true and a cell value has changed and requires storage in the underlying data source.

System_CAPS_pubeventChangeUICues

Occurs when the focus or keyboard user interface (UI) cues change.(Inherited from Control.)

System_CAPS_pubeventClick

Occurs when the control is clicked.(Inherited from Control.)

System_CAPS_pubeventClientSizeChanged

Occurs when the value of the ClientSize property changes. (Inherited from Control.)

System_CAPS_pubeventColumnAdded

Occurs when a column is added to the control.

System_CAPS_pubeventColumnContextMenuStripChanged

Occurs when the ContextMenuStrip property of a column changes.

System_CAPS_pubeventColumnDataPropertyNameChanged

Occurs when the value of the DataPropertyName property for a column changes.

System_CAPS_pubeventColumnDefaultCellStyleChanged

Occurs when the value of the DefaultCellStyle property for a column changes.

System_CAPS_pubeventColumnDisplayIndexChanged

Occurs when the value the DisplayIndex property for a column changes.

System_CAPS_pubeventColumnDividerDoubleClick

Occurs when the user double-clicks a divider between two columns.

System_CAPS_pubeventColumnDividerWidthChanged

Occurs when the DividerWidth property changes.

System_CAPS_pubeventColumnHeaderCellChanged

Occurs when the contents of a column header cell change.

System_CAPS_pubeventColumnHeaderMouseClick

Occurs when the user clicks a column header.

System_CAPS_pubeventColumnHeaderMouseDoubleClick

Occurs when a column header is double-clicked.

System_CAPS_pubeventColumnHeadersBorderStyleChanged

Occurs when the ColumnHeadersBorderStyle property changes.

System_CAPS_pubeventColumnHeadersDefaultCellStyleChanged

Occurs when the value of the ColumnHeadersDefaultCellStyle property changes.

System_CAPS_pubeventColumnHeadersHeightChanged

Occurs when the value of the ColumnHeadersHeight property changes.

System_CAPS_pubeventColumnHeadersHeightSizeModeChanged

Occurs when the value of the ColumnHeadersHeightSizeMode property changes.

System_CAPS_pubeventColumnMinimumWidthChanged

Occurs when the value of the MinimumWidth property for a column changes.

System_CAPS_pubeventColumnNameChanged

Occurs when the value of the Name property for a column changes.

System_CAPS_pubeventColumnRemoved

Occurs when a column is removed from the control.

System_CAPS_pubeventColumnSortModeChanged

Occurs when the value of the SortMode property for a column changes.

System_CAPS_pubeventColumnStateChanged

Occurs when a column changes state, such as gaining or losing focus.

System_CAPS_pubeventColumnToolTipTextChanged

Occurs when the ToolTipText property value changes for a column in the DataGridView.

System_CAPS_pubeventColumnWidthChanged

Occurs when the value of the Width property for a column changes.

System_CAPS_pubeventContextMenuChanged

Occurs when the value of the ContextMenu property changes.(Inherited from Control.)

System_CAPS_pubeventContextMenuStripChanged

Occurs when the value of the ContextMenuStrip property changes. (Inherited from Control.)

System_CAPS_pubeventControlAdded

Occurs when a new control is added to the Control.ControlCollection.(Inherited from Control.)

System_CAPS_pubeventControlRemoved

Occurs when a control is removed from the Control.ControlCollection.(Inherited from Control.)

System_CAPS_pubeventCurrentCellChanged

Occurs when the CurrentCell property changes.

System_CAPS_pubeventCurrentCellDirtyStateChanged

Occurs when the state of a cell changes in relation to a change in its contents.

System_CAPS_pubeventCursorChanged

Occurs when the value of the Cursor property changes.(Inherited from Control.)

System_CAPS_pubeventDataBindingComplete

Occurs after a data-binding operation has finished.

System_CAPS_pubeventDataError

Occurs when an external data-parsing or validation operation throws an exception, or when an attempt to commit data to a data source fails.

System_CAPS_pubeventDataMemberChanged

Occurs when value of the DataMember property changes.

System_CAPS_pubeventDataSourceChanged

Occurs when the value of the DataSource property changes.

System_CAPS_pubeventDefaultCellStyleChanged

Occurs when the value of the DefaultCellStyle property changes.

System_CAPS_pubeventDefaultValuesNeeded

Occurs when the user enters the row for new records so that it can be populated with default values.

System_CAPS_pubeventDisposed

Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

System_CAPS_pubeventDockChanged

Occurs when the value of the Dock property changes.(Inherited from Control.)

System_CAPS_pubeventDoubleClick

Occurs when the control is double-clicked.(Inherited from Control.)

System_CAPS_pubeventDragDrop

Occurs when a drag-and-drop operation is completed.(Inherited from Control.)

System_CAPS_pubeventDragEnter

Occurs when an object is dragged into the control's bounds.(Inherited from Control.)

System_CAPS_pubeventDragLeave

Occurs when an object is dragged out of the control's bounds.(Inherited from Control.)

System_CAPS_pubeventDragOver

Occurs when an object is dragged over the control's bounds.(Inherited from Control.)

System_CAPS_pubeventEditingControlShowing

Occurs when a control for editing a cell is showing.

System_CAPS_pubeventEditModeChanged

Occurs when the value of the EditMode property changes.

System_CAPS_pubeventEnabledChanged

Occurs when the Enabled property value has changed.(Inherited from Control.)

System_CAPS_pubeventEnter

Occurs when the control is entered.(Inherited from Control.)

System_CAPS_pubeventFontChanged

Occurs when the Font property value changes.

System_CAPS_pubeventForeColorChanged

Occurs when the ForeColor property value changes.

System_CAPS_pubeventGiveFeedback

Occurs during a drag operation.(Inherited from Control.)

System_CAPS_pubeventGotFocus

Occurs when the control receives focus.(Inherited from Control.)

System_CAPS_pubeventGridColorChanged

Occurs when the value of the GridColor property changes.

System_CAPS_pubeventHandleCreated

Occurs when a handle is created for the control.(Inherited from Control.)

System_CAPS_pubeventHandleDestroyed

Occurs when the control's handle is in the process of being destroyed.(Inherited from Control.)

System_CAPS_pubeventHelpRequested

Occurs when the user requests help for a control.(Inherited from Control.)

System_CAPS_pubeventImeModeChanged

Occurs when the ImeMode property has changed.(Inherited from Control.)

System_CAPS_pubeventInvalidated

Occurs when a control's display requires redrawing.(Inherited from Control.)

System_CAPS_pubeventKeyDown

Occurs when a key is pressed while the control has focus.(Inherited from Control.)

System_CAPS_pubeventKeyPress

Occurs when a character. space or backspace key is pressed while the control has focus.(Inherited from Control.)

System_CAPS_pubeventKeyUp

Occurs when a key is released while the control has focus.(Inherited from Control.)

System_CAPS_pubeventLayout

Occurs when a control should reposition its child controls.(Inherited from Control.)

System_CAPS_pubeventLeave

Occurs when the input focus leaves the control.(Inherited from Control.)

System_CAPS_pubeventLocationChanged

Occurs when the Location property value has changed.(Inherited from Control.)

System_CAPS_pubeventLostFocus

Occurs when the control loses focus.(Inherited from Control.)

System_CAPS_pubeventMarginChanged

Occurs when the control's margin changes.(Inherited from Control.)

System_CAPS_pubeventMouseCaptureChanged

Occurs when the control loses mouse capture.(Inherited from Control.)

System_CAPS_pubeventMouseClick

Occurs when the control is clicked by the mouse.(Inherited from Control.)

System_CAPS_pubeventMouseDoubleClick

Occurs when the control is double clicked by the mouse.(Inherited from Control.)

System_CAPS_pubeventMouseDown

Occurs when the mouse pointer is over the control and a mouse button is pressed.(Inherited from Control.)

System_CAPS_pubeventMouseEnter

Occurs when the mouse pointer enters the control.(Inherited from Control.)

System_CAPS_pubeventMouseHover

Occurs when the mouse pointer rests on the control.(Inherited from Control.)

System_CAPS_pubeventMouseLeave

Occurs when the mouse pointer leaves the control.(Inherited from Control.)

System_CAPS_pubeventMouseMove

Occurs when the mouse pointer is moved over the control.(Inherited from Control.)

System_CAPS_pubeventMouseUp

Occurs when the mouse pointer is over the control and a mouse button is released.(Inherited from Control.)

System_CAPS_pubeventMouseWheel

Occurs when the mouse wheel moves while the control has focus.(Inherited from Control.)

System_CAPS_pubeventMove

Occurs when the control is moved.(Inherited from Control.)

System_CAPS_pubeventMultiSelectChanged

Occurs when the value of the MultiSelect property changes.

System_CAPS_pubeventNewRowNeeded

Occurs when the VirtualMode property of the DataGridView is true and the user navigates to the new row at the bottom of the DataGridView.

System_CAPS_pubeventPaddingChanged

This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the value of the Padding property changes.

System_CAPS_pubeventPaint

Occurs when the control is redrawn.(Inherited from Control.)

System_CAPS_pubeventParentChanged

Occurs when the Parent property value changes.(Inherited from Control.)

System_CAPS_pubeventPreviewKeyDown

Occurs before the KeyDown event when a key is pressed while focus is on this control.(Inherited from Control.)

System_CAPS_pubeventQueryAccessibilityHelp

Occurs when AccessibleObject is providing help to accessibility applications.(Inherited from Control.)

System_CAPS_pubeventQueryContinueDrag

Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.(Inherited from Control.)

System_CAPS_pubeventReadOnlyChanged

Occurs when the ReadOnly property changes.

System_CAPS_pubeventRegionChanged

Occurs when the value of the Region property changes.(Inherited from Control.)

System_CAPS_pubeventResize

Occurs when the control is resized.(Inherited from Control.)

System_CAPS_pubeventRightToLeftChanged

Occurs when the RightToLeft property value changes.(Inherited from Control.)

System_CAPS_pubeventRowContextMenuStripChanged

Occurs when the ContextMenuStrip property changes.

System_CAPS_pubeventRowContextMenuStripNeeded

Occurs when a row's shortcut menu is needed.

System_CAPS_pubeventRowDefaultCellStyleChanged

Occurs when the value of the DefaultCellStyle property for a row changes.

System_CAPS_pubeventRowDirtyStateNeeded

Occurs when the VirtualMode property of the DataGridView control is true and the DataGridView needs to determine whether the current row has uncommitted changes.

System_CAPS_pubeventRowDividerDoubleClick

Occurs when the user double-clicks the divider between two rows.

System_CAPS_pubeventRowDividerHeightChanged

Occurs when the DividerHeight property changes.

System_CAPS_pubeventRowEnter

Occurs when a row receives input focus but before it becomes the current row.

System_CAPS_pubeventRowErrorTextChanged

Occurs when the ErrorText property of a row changes.

System_CAPS_pubeventRowErrorTextNeeded

Occurs when a row's error text is needed.

System_CAPS_pubeventRowHeaderCellChanged

Occurs when the user changes the contents of a row header cell.

System_CAPS_pubeventRowHeaderMouseClick

Occurs when the user clicks within the boundaries of a row header.

System_CAPS_pubeventRowHeaderMouseDoubleClick

Occurs when a row header is double-clicked.

System_CAPS_pubeventRowHeadersBorderStyleChanged

Occurs when the RowHeadersBorderStyle property changes.

System_CAPS_pubeventRowHeadersDefaultCellStyleChanged

Occurs when the value of the RowHeadersDefaultCellStyleproperty changes.

System_CAPS_pubeventRowHeadersWidthChanged

Occurs when value of the RowHeadersWidth property changes.

System_CAPS_pubeventRowHeadersWidthSizeModeChanged

Occurs when the value of the RowHeadersWidthSizeMode property changes.

System_CAPS_pubeventRowHeightChanged

Occurs when the value of the Height property for a row changes.

System_CAPS_pubeventRowHeightInfoNeeded

Occurs when information about row height is requested.

System_CAPS_pubeventRowHeightInfoPushed

Occurs when the user changes the height of a row.

System_CAPS_pubeventRowLeave

Occurs when a row loses input focus and is no longer the current row.

System_CAPS_pubeventRowMinimumHeightChanged

Occurs when the value of the MinimumHeight property for a row changes.

System_CAPS_pubeventRowPostPaint

Occurs after a DataGridViewRow is painted.

System_CAPS_pubeventRowPrePaint

Occurs before a DataGridViewRow is painted

System_CAPS_pubeventRowsAdded

Occurs after a new row is added to the DataGridView.

System_CAPS_pubeventRowsDefaultCellStyleChanged

Occurs when the value of the RowsDefaultCellStyle property changes.

System_CAPS_pubeventRowsRemoved

Occurs when a row or rows are deleted from the DataGridView.

System_CAPS_pubeventRowStateChanged

Occurs when a row changes state, such as losing or gaining input focus.

System_CAPS_pubeventRowUnshared

Occurs when a row's state changes from shared to unshared.

System_CAPS_pubeventRowValidated

Occurs after a row has finished validating.

System_CAPS_pubeventRowValidating

Occurs when a row is validating.

System_CAPS_pubeventScroll

Occurs when the user scrolls through the control contents.

System_CAPS_pubeventSelectionChanged

Occurs when the current selection changes.

System_CAPS_pubeventSizeChanged

Occurs when the Size property value changes.(Inherited from Control.)

System_CAPS_pubeventSortCompare

Occurs when the DataGridView compares two cell values to perform a sort operation.

System_CAPS_pubeventSorted

Occurs when the DataGridView control completes a sorting operation.

System_CAPS_pubeventStyleChanged

This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the control style changes.

System_CAPS_pubeventSystemColorsChanged

Occurs when the system colors change.(Inherited from Control.)

System_CAPS_pubeventTabIndexChanged

Occurs when the TabIndex property value changes.(Inherited from Control.)

System_CAPS_pubeventTabStopChanged

Occurs when the TabStop property value changes.(Inherited from Control.)

System_CAPS_pubeventTextChanged

This API supports the product infrastructure and is not intended to be used directly from your code. Occurs when the value of the Text property changes.

System_CAPS_pubeventUserAddedRow

Occurs when the user has finished adding a row to the DataGridView control.

System_CAPS_pubeventUserDeletedRow

Occurs when the user has finished deleting a row from the DataGridView control.

System_CAPS_pubeventUserDeletingRow

Occurs when the user deletes a row from the DataGridView control.

System_CAPS_pubeventValidated

Occurs when the control is finished validating.(Inherited from Control.)

System_CAPS_pubeventValidating

Occurs when the control is validating.(Inherited from Control.)

System_CAPS_pubeventVisibleChanged

Occurs when the Visible property value changes.(Inherited from Control.)

Return to top
Show:
© 2016 Microsoft