Export (0) Print
Expand All
Expand Minimize
1 out of 4 rated this helpful - Rate this topic

DataGridView Events

The DataGridView type exposes the following members.

  Name Description
Public event AllowUserToAddRowsChanged Occurs when the value of the AllowUserToAddRows property changes.
Public event AllowUserToDeleteRowsChanged Occurs when the value of the AllowUserToDeleteRowsChanged property changes.
Public event AllowUserToOrderColumnsChanged Occurs when the value of the AllowUserToOrderColumns property changes.
Public event AllowUserToResizeColumnsChanged Occurs when the value of the AllowUserToResizeColumns property changes.
Public event AllowUserToResizeRowsChanged Occurs when the value of the AllowUserToResizeRows property changes.
Public event AlternatingRowsDefaultCellStyleChanged Occurs when the value of the AlternatingRowsDefaultCellStyle property changes.
Public event AutoGenerateColumnsChanged Occurs when the value of the AutoGenerateColumnsChanged property changes.
Public event AutoSizeChanged Infrastructure. This event is not relevant for this class. (Inherited from Control.)
Public event AutoSizeColumnModeChanged Occurs when the value of the AutoSizeMode property of a column changes.
Public event AutoSizeColumnsModeChanged Occurs when the value of the AutoSizeColumnsMode property changes.
Public event AutoSizeRowsModeChanged Occurs when the value of the DataGridViewAutoSizeRowsMode property changes.
Public event BackColorChanged Infrastructure. Occurs when the value of the BackColor property changes.
Public event BackgroundColorChanged Occurs when the value of the BackgroundColor property changes.
Public event BackgroundImageChanged Infrastructure. Occurs when the value of the BackgroundImage property changes.
Public event BackgroundImageLayoutChanged Infrastructure. Occurs when the BackgroundImageLayout property changes.
Public event BindingContextChanged Occurs when the value of the BindingContext property changes. (Inherited from Control.)
Public event BorderStyleChanged Occurs when the value of the BorderStyle property changes.
Public event CancelRowEdit Occurs when the VirtualMode property of a DataGridView control is true and the cancels edits in a row.
Public event CausesValidationChanged Occurs when the value of the CausesValidation property changes. (Inherited from Control.)
Public event CellBeginEdit Occurs when edit mode starts for the selected cell.
Public event CellBorderStyleChanged Occurs when the border style of a cell changes.
Public event CellClick Occurs when any part of a cell is clicked.
Public event CellContentClick Occurs when the content within a cell is clicked.
Public event CellContentDoubleClick Occurs when the user double-clicks a cell's contents.
Public event CellContextMenuStripChanged Occurs when the ContextMenuStrip property changes.
Public event CellContextMenuStripNeeded Occurs when a cell's shortcut menu is needed.
Public event CellDoubleClick Occurs when the user double-clicks anywhere in a cell.
Public event CellEndEdit Occurs when edit mode stops for the currently selected cell.
Public event CellEnter Occurs when the current cell changes in the DataGridView control or when the control receives input focus.
Public event CellErrorTextChanged Occurs when the value of the ErrorText property of a cell changes.
Public event CellErrorTextNeeded Occurs when a cell's error text is needed.
Public event CellFormatting Occurs when the contents of a cell need to be formatted for display.
Public event CellLeave Occurs when a cell loses input focus and is no longer the current cell.
Public event CellMouseClick Occurs whenever the user clicks anywhere on a cell with the mouse.
Public event CellMouseDoubleClick Occurs when a cell within the DataGridView is double-clicked.
Public event CellMouseDown Occurs when the user presses a mouse button while the mouse pointer is within the boundaries of a cell.
Public event CellMouseEnter Occurs when the mouse pointer enters a cell.
Public event CellMouseLeave Occurs when the mouse pointer leaves a cell.
Public event CellMouseMove Occurs when the mouse pointer moves over the DataGridView control.
Public event CellMouseUp Occurs when the user releases a mouse button while over a cell.
Public event CellPainting Occurs when a cell needs to be drawn.
Public event CellParsing Occurs when a cell leaves edit mode if the cell value has been modified.
Public event CellStateChanged Occurs when a cell state changes, such as when the cell loses or gains focus.
Public event CellStyleChanged Occurs when the Style property of a DataGridViewCell changes.
Public event CellStyleContentChanged Occurs when one of the values of a cell style changes.
Public event CellToolTipTextChanged Occurs when the ToolTipText property value changes for a cell in the DataGridView.
Public event CellToolTipTextNeeded Occurs when a cell's ToolTip text is needed.
Public event CellValidated Occurs after the cell has finished validating.
Public event CellValidating Occurs when a cell loses input focus, enabling content validation.
Public event CellValueChanged Occurs when the value of a cell changes.
Public event CellValueNeeded 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.
Public event CellValuePushed 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.
Public event ChangeUICues Occurs when the focus or keyboard user interface (UI) cues change. (Inherited from Control.)
Public event Click Occurs when the control is clicked. (Inherited from Control.)
Public event ClientSizeChanged Occurs when the value of the ClientSize property changes. (Inherited from Control.)
Public event ColumnAdded Occurs when a column is added to the control.
Public event ColumnContextMenuStripChanged Occurs when the ContextMenuStrip property of a column changes.
Public event ColumnDataPropertyNameChanged Occurs when the value of the DataPropertyName property for a column changes.
Public event ColumnDefaultCellStyleChanged Occurs when the value of the DefaultCellStyle property for a column changes.
Public event ColumnDisplayIndexChanged Occurs when the value the DisplayIndex property for a column changes.
Public event ColumnDividerDoubleClick Occurs when the user double-clicks a divider between two columns.
Public event ColumnDividerWidthChanged Occurs when the DividerWidth property changes.
Public event ColumnHeaderCellChanged Occurs when the contents of a column header cell change.
Public event ColumnHeaderMouseClick Occurs when the user clicks a column header.
Public event ColumnHeaderMouseDoubleClick Occurs when a column header is double-clicked.
Public event ColumnHeadersBorderStyleChanged Occurs when the ColumnHeadersBorderStyle property changes.
Public event ColumnHeadersDefaultCellStyleChanged Occurs when the value of the ColumnHeadersDefaultCellStyle property changes.
Public event ColumnHeadersHeightChanged Occurs when the value of the ColumnHeadersHeight property changes.
Public event ColumnHeadersHeightSizeModeChanged Occurs when the value of the ColumnHeadersHeightSizeMode property changes.
Public event ColumnMinimumWidthChanged Occurs when the value of the MinimumWidth property for a column changes.
Public event ColumnNameChanged Occurs when the value of the Name property for a column changes.
Public event ColumnRemoved Occurs when a column is removed from the control.
Public event ColumnSortModeChanged Occurs when the value of the SortMode property for a column changes.
Public event ColumnStateChanged Occurs when a column changes state, such as gaining or losing focus.
Public event ColumnToolTipTextChanged Occurs when the ToolTipText property value changes for a column in the DataGridView.
Public event ColumnWidthChanged Occurs when the value of the Width property for a column changes.
Public event ContextMenuChanged Occurs when the value of the ContextMenu property changes. (Inherited from Control.)
Public event ContextMenuStripChanged Occurs when the value of the ContextMenuStrip property changes. (Inherited from Control.)
Public event ControlAdded Occurs when a new control is added to the Control.ControlCollection. (Inherited from Control.)
Public event ControlRemoved Occurs when a control is removed from the Control.ControlCollection. (Inherited from Control.)
Public event CurrentCellChanged Occurs when the CurrentCell property changes.
Public event CurrentCellDirtyStateChanged Occurs when the state of a cell changes in relation to a change in its contents.
Public event CursorChanged Occurs when the value of the Cursor property changes. (Inherited from Control.)
Public event DataBindingComplete Occurs after a data-binding operation has finished.
Public event DataError Occurs when an external data-parsing or validation operation throws an exception, or when an attempt to commit data to a data source fails.
Public event DataMemberChanged Occurs when value of the DataMember property changes.
Public event DataSourceChanged Occurs when the value of the DataSource property changes.
Public event DefaultCellStyleChanged Occurs when the value of the DefaultCellStyle property changes.
Public event DefaultValuesNeeded Occurs when the user enters the row for new records so that it can be populated with default values.
Public event Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public event DockChanged Occurs when the value of the Dock property changes. (Inherited from Control.)
Public event DoubleClick Occurs when the control is double-clicked. (Inherited from Control.)
Public event DragDrop Occurs when a drag-and-drop operation is completed. (Inherited from Control.)
Public event DragEnter Occurs when an object is dragged into the control's bounds. (Inherited from Control.)
Public event DragLeave Occurs when an object is dragged out of the control's bounds. (Inherited from Control.)
Public event DragOver Occurs when an object is dragged over the control's bounds. (Inherited from Control.)
Public event EditingControlShowing Occurs when a control for editing a cell is showing.
Public event EditModeChanged Occurs when the value of the EditMode property changes.
Public event EnabledChanged Occurs when the Enabled property value has changed. (Inherited from Control.)
Public event Enter Occurs when the control is entered. (Inherited from Control.)
Public event FontChanged Occurs when the Font property value changes.
Public event ForeColorChanged Occurs when the ForeColor property value changes.
Public event GiveFeedback Occurs during a drag operation. (Inherited from Control.)
Public event GotFocus Occurs when the control receives focus. (Inherited from Control.)
Public event GridColorChanged Occurs when the value of the GridColor property changes.
Public event HandleCreated Occurs when a handle is created for the control. (Inherited from Control.)
Public event HandleDestroyed Occurs when the control's handle is in the process of being destroyed. (Inherited from Control.)
Public event HelpRequested Occurs when the user requests help for a control. (Inherited from Control.)
Public event ImeModeChanged Occurs when the ImeMode property has changed. (Inherited from Control.)
Public event Invalidated Occurs when a control's display requires redrawing. (Inherited from Control.)
Public event KeyDown Occurs when a key is pressed while the control has focus. (Inherited from Control.)
Public event KeyPress Occurs when a key is pressed while the control has focus. (Inherited from Control.)
Public event KeyUp Occurs when a key is released while the control has focus. (Inherited from Control.)
Public event Layout Occurs when a control should reposition its child controls. (Inherited from Control.)
Public event Leave Occurs when the input focus leaves the control. (Inherited from Control.)
Public event LocationChanged Occurs when the Location property value has changed. (Inherited from Control.)
Public event LostFocus Occurs when the control loses focus. (Inherited from Control.)
Public event MarginChanged Occurs when the control's margin changes. (Inherited from Control.)
Public event MouseCaptureChanged Occurs when the control loses mouse capture. (Inherited from Control.)
Public event MouseClick Occurs when the control is clicked by the mouse. (Inherited from Control.)
Public event MouseDoubleClick Occurs when the control is double clicked by the mouse. (Inherited from Control.)
Public event MouseDown Occurs when the mouse pointer is over the control and a mouse button is pressed. (Inherited from Control.)
Public event MouseEnter Occurs when the mouse pointer enters the control. (Inherited from Control.)
Public event MouseHover Occurs when the mouse pointer rests on the control. (Inherited from Control.)
Public event MouseLeave Occurs when the mouse pointer leaves the control. (Inherited from Control.)
Public event MouseMove Occurs when the mouse pointer is moved over the control. (Inherited from Control.)
Public event MouseUp Occurs when the mouse pointer is over the control and a mouse button is released. (Inherited from Control.)
Public event MouseWheel Occurs when the mouse wheel moves while the control has focus. (Inherited from Control.)
Public event Move Occurs when the control is moved. (Inherited from Control.)
Public event MultiSelectChanged Occurs when the value of the MultiSelect property changes.
Public event NewRowNeeded Occurs when the VirtualMode property of the DataGridView is true and the user navigates to the new row at the bottom of the DataGridView.
Public event PaddingChanged Infrastructure. Occurs when the value of the Padding property changes.
Public event Paint Occurs when the control is redrawn. (Inherited from Control.)
Public event ParentChanged Occurs when the Parent property value changes. (Inherited from Control.)
Public event PreviewKeyDown Occurs before the KeyDown event when a key is pressed while focus is on this control. (Inherited from Control.)
Public event QueryAccessibilityHelp Occurs when AccessibleObject is providing help to accessibility applications. (Inherited from Control.)
Public event QueryContinueDrag 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.)
Public event ReadOnlyChanged Occurs when the ReadOnly property changes.
Public event RegionChanged Occurs when the value of the Region property changes. (Inherited from Control.)
Public event Resize Occurs when the control is resized. (Inherited from Control.)
Public event RightToLeftChanged Occurs when the RightToLeft property value changes. (Inherited from Control.)
Public event RowContextMenuStripChanged Occurs when the ContextMenuStrip property changes.
Public event RowContextMenuStripNeeded Occurs when a row's shortcut menu is needed.
Public event RowDefaultCellStyleChanged Occurs when the value of the DefaultCellStyle property for a row changes.
Public event RowDirtyStateNeeded Occurs when the VirtualMode property of the DataGridView control is true and the DataGridView needs to determine whether the current row has uncommitted changes.
Public event RowDividerDoubleClick Occurs when the user double-clicks the divider between two rows.
Public event RowDividerHeightChanged Occurs when the DividerHeight property changes.
Public event RowEnter Occurs when a row receives input focus but before it becomes the current row.
Public event RowErrorTextChanged Occurs when the ErrorText property of a row changes.
Public event RowErrorTextNeeded Occurs when a row's error text is needed.
Public event RowHeaderCellChanged Occurs when the user changes the contents of a row header cell.
Public event RowHeaderMouseClick Occurs when the user clicks within the boundaries of a row header.
Public event RowHeaderMouseDoubleClick Occurs when a row header is double-clicked.
Public event RowHeadersBorderStyleChanged Occurs when the RowHeadersBorderStyle property changes.
Public event RowHeadersDefaultCellStyleChanged Occurs when the value of the RowHeadersDefaultCellStyle property changes.
Public event RowHeadersWidthChanged Occurs when value of the RowHeadersWidth property changes.
Public event RowHeadersWidthSizeModeChanged Occurs when the value of the RowHeadersWidthSizeMode property changes.
Public event RowHeightChanged Occurs when the value of the Height property for a row changes.
Public event RowHeightInfoNeeded Occurs when information about row height is requested.
Public event RowHeightInfoPushed Occurs when the user changes the height of a row.
Public event RowLeave Occurs when a row loses input focus and is no longer the current row.
Public event RowMinimumHeightChanged Occurs when the value of the MinimumHeight property for a row changes.
Public event RowPostPaint Occurs after a DataGridViewRow is painted.
Public event RowPrePaint Occurs before a DataGridViewRow is painted
Public event RowsAdded Occurs after a new row is added to the DataGridView.
Public event RowsDefaultCellStyleChanged Occurs when the value of the RowsDefaultCellStyle property changes.
Public event RowsRemoved Occurs when a row or rows are deleted from the DataGridView.
Public event RowStateChanged Occurs when a row changes state, such as losing or gaining input focus.
Public event RowUnshared Occurs when a row's state changes from shared to unshared.
Public event RowValidated Occurs after a row has finished validating.
Public event RowValidating Occurs when a row is validating.
Public event Scroll Occurs when the user scrolls through the control contents.
Public event SelectionChanged Occurs when the current selection changes.
Public event SizeChanged Occurs when the Size property value changes. (Inherited from Control.)
Public event SortCompare Occurs when the DataGridView compares two cell values to perform a sort operation.
Public event Sorted Occurs when the DataGridView control completes a sorting operation.
Public event StyleChanged Infrastructure. Occurs when the control style changes.
Public event SystemColorsChanged Occurs when the system colors change. (Inherited from Control.)
Public event TabIndexChanged Occurs when the TabIndex property value changes. (Inherited from Control.)
Public event TabStopChanged Occurs when the TabStop property value changes. (Inherited from Control.)
Public event TextChanged Infrastructure. Occurs when the value of the Text property changes.
Public event UserAddedRow Occurs when the user has finished adding a row to the DataGridView control.
Public event UserDeletedRow Occurs when the user has finished deleting a row from the DataGridView control.
Public event UserDeletingRow Occurs when the user deletes a row from the DataGridView control.
Public event Validated Occurs when the control is finished validating. (Inherited from Control.)
Public event Validating Occurs when the control is validating. (Inherited from Control.)
Public event VisibleChanged Occurs when the Visible property value changes. (Inherited from Control.)
Top
Show:
© 2014 Microsoft. All rights reserved.