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

DataGridView Class

 

Displays data in a customizable grid.

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

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.Control
        System.Windows.Forms.DataGridView

[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
[ComplexBindingPropertiesAttribute("DataSource", "DataMember")]
[DockingAttribute(DockingBehavior.Ask)]
public class DataGridView : Control, ISupportInitialize

NameDescription
System_CAPS_pubmethodDataGridView()

Initializes a new instance of the DataGridView class.

NameDescription
System_CAPS_pubpropertyAccessibilityObject

Gets the AccessibleObject assigned to the control.(Inherited from Control.)

System_CAPS_pubpropertyAccessibleDefaultActionDescription

Gets or sets the default action description of the control for use by accessibility client applications.(Inherited from Control.)

System_CAPS_pubpropertyAccessibleDescription

Gets or sets the description of the control used by accessibility client applications.(Inherited from Control.)

System_CAPS_pubpropertyAccessibleName

Gets or sets the name of the control used by accessibility client applications.(Inherited from Control.)

System_CAPS_pubpropertyAccessibleRole

Gets or sets the accessible role of the control (Inherited from Control.)

System_CAPS_pubpropertyAdjustedTopLeftHeaderBorderStyle

Gets the border style for the upper-left cell in the DataGridView.

System_CAPS_pubpropertyAdvancedCellBorderStyle

Gets the border style of the cells in the DataGridView.

System_CAPS_pubpropertyAdvancedColumnHeadersBorderStyle

Gets the border style of the column header cells in the DataGridView.

System_CAPS_pubpropertyAdvancedRowHeadersBorderStyle

Gets the border style of the row header cells in the DataGridView.

System_CAPS_pubpropertyAllowDrop

Gets or sets a value indicating whether the control can accept data that the user drags onto it.(Inherited from Control.)

System_CAPS_pubpropertyAllowUserToAddRows

Gets or sets a value indicating whether the option to add rows is displayed to the user.

System_CAPS_pubpropertyAllowUserToDeleteRows

Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.

System_CAPS_pubpropertyAllowUserToOrderColumns

Gets or sets a value indicating whether manual column repositioning is enabled.

System_CAPS_pubpropertyAllowUserToResizeColumns

Gets or sets a value indicating whether users can resize columns.

System_CAPS_pubpropertyAllowUserToResizeRows

Gets or sets a value indicating whether users can resize rows.

System_CAPS_pubpropertyAlternatingRowsDefaultCellStyle

Gets or sets the default cell style applied to odd-numbered rows of the DataGridView.

System_CAPS_pubpropertyAnchor

Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent. (Inherited from Control.)

System_CAPS_pubpropertyAutoGenerateColumns

Gets or sets a value indicating whether columns are created automatically when the DataSource or DataMember properties are set.

System_CAPS_pubpropertyAutoScrollOffset

Gets or sets where this control is scrolled to in ScrollControlIntoView.(Inherited from Control.)

System_CAPS_pubpropertyAutoSize

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

System_CAPS_pubpropertyAutoSizeColumnsMode

Gets or sets a value indicating how column widths are determined.

System_CAPS_pubpropertyAutoSizeRowsMode

Gets or sets a value indicating how row heights are determined.

System_CAPS_pubpropertyBackColor

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the background color for the control.(Overrides Control.BackColor.)

System_CAPS_pubpropertyBackgroundColor

Gets or sets the background color of the DataGridView.

System_CAPS_pubpropertyBackgroundImage

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the background image displayed in the control.(Overrides Control.BackgroundImage.)

System_CAPS_pubpropertyBackgroundImageLayout

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the background image layout as defined in the ImageLayout enumeration.(Overrides Control.BackgroundImageLayout.)

System_CAPS_pubpropertyBindingContext

Gets or sets the BindingContext for the control.(Inherited from Control.)

System_CAPS_pubpropertyBorderStyle

Gets or sets the border style for the DataGridView.

System_CAPS_pubpropertyBottom

Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.(Inherited from Control.)

System_CAPS_pubpropertyBounds

Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control.(Inherited from Control.)

System_CAPS_protpropertyCanEnableIme

Gets a value indicating whether the ImeMode property can be set to an active value, to enable IME support.(Overrides Control.CanEnableIme.)

System_CAPS_pubpropertyCanFocus

Gets a value indicating whether the control can receive focus.(Inherited from Control.)

System_CAPS_protpropertyCanRaiseEvents

Determines if events can be raised on the control.(Inherited from Control.)

System_CAPS_pubpropertyCanSelect

Gets a value indicating whether the control can be selected.(Inherited from Control.)

System_CAPS_pubpropertyCapture

Gets or sets a value indicating whether the control has captured the mouse.(Inherited from Control.)

System_CAPS_pubpropertyCausesValidation

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.(Inherited from Control.)

System_CAPS_pubpropertyCellBorderStyle

Gets the cell border style for the DataGridView.

System_CAPS_pubpropertyClientRectangle

Gets the rectangle that represents the client area of the control.(Inherited from Control.)

System_CAPS_pubpropertyClientSize

Gets or sets the height and width of the client area of the control.(Inherited from Control.)

System_CAPS_pubpropertyClipboardCopyMode

Gets or sets a value that indicates whether users can copy cell text values to the Clipboard and whether row and column header text is included.

System_CAPS_pubpropertyColumnCount

Gets or sets the number of columns displayed in the DataGridView.

System_CAPS_pubpropertyColumnHeadersBorderStyle

Gets the border style applied to the column headers.

System_CAPS_pubpropertyColumnHeadersDefaultCellStyle

Gets or sets the default column header style.

System_CAPS_pubpropertyColumnHeadersHeight

Gets or sets the height, in pixels, of the column headers row

System_CAPS_pubpropertyColumnHeadersHeightSizeMode

Gets or sets a value indicating whether the height of the column headers is adjustable and whether it can be adjusted by the user or is automatically adjusted to fit the contents of the headers.

System_CAPS_pubpropertyColumnHeadersVisible

Gets or sets a value indicating whether the column header row is displayed.

System_CAPS_pubpropertyColumns

Gets a collection that contains all the columns in the control.

System_CAPS_pubpropertyCompanyName

Gets the name of the company or creator of the application containing the control.(Inherited from Control.)

System_CAPS_pubpropertyContainer

Gets the IContainer that contains the Component.(Inherited from Component.)

System_CAPS_pubpropertyContainsFocus

Gets a value indicating whether the control, or one of its child controls, currently has the input focus.(Inherited from Control.)

System_CAPS_pubpropertyContextMenu

Gets or sets the shortcut menu associated with the control.(Inherited from Control.)

System_CAPS_pubpropertyContextMenuStrip

Gets or sets the ContextMenuStrip associated with this control.(Inherited from Control.)

System_CAPS_pubpropertyControls

Gets the collection of controls contained within the control.(Inherited from Control.)

System_CAPS_pubpropertyCreated

Gets a value indicating whether the control has been created.(Inherited from Control.)

System_CAPS_protpropertyCreateParams

Gets the required creation parameters when the control handle is created.(Inherited from Control.)

System_CAPS_pubpropertyCurrentCell

Gets or sets the currently active cell.

System_CAPS_pubpropertyCurrentCellAddress

Gets the row and column indexes of the currently active cell.

System_CAPS_pubpropertyCurrentRow

Gets the row containing the current cell.

System_CAPS_pubpropertyCursor

Gets or sets the cursor that is displayed when the mouse pointer is over the control.(Inherited from Control.)

System_CAPS_pubpropertyDataBindings

Gets the data bindings for the control.(Inherited from Control.)

System_CAPS_pubpropertyDataMember

Gets or sets the name of the list or table in the data source for which the DataGridView is displaying data.

System_CAPS_pubpropertyDataSource

Gets or sets the data source that the DataGridView is displaying data for.

System_CAPS_pubpropertyDefaultCellStyle

Gets or sets the default cell style to be applied to the cells in the DataGridView if no other cell style properties are set.

System_CAPS_protpropertyDefaultCursor

Gets or sets the default cursor for the control.(Inherited from Control.)

System_CAPS_protpropertyDefaultImeMode

Gets the default Input Method Editor (IME) mode supported by the control.(Inherited from Control.)

System_CAPS_protpropertyDefaultMargin

Gets the space, in pixels, that is specified by default between controls.(Inherited from Control.)

System_CAPS_protpropertyDefaultMaximumSize

Gets the length and height, in pixels, that is specified as the default maximum size of a control.(Inherited from Control.)

System_CAPS_protpropertyDefaultMinimumSize

Gets the length and height, in pixels, that is specified as the default minimum size of a control.(Inherited from Control.)

System_CAPS_protpropertyDefaultPadding

Gets the internal spacing, in pixels, of the contents of a control.(Inherited from Control.)

System_CAPS_protpropertyDefaultSize

Gets the default initial size of the control.(Overrides Control.DefaultSize.)

System_CAPS_protpropertyDesignMode

Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)

System_CAPS_pubpropertyDisplayRectangle

Gets the rectangle that represents the display area of the control.(Overrides Control.DisplayRectangle.)

System_CAPS_pubpropertyDisposing

Gets a value indicating whether the base Control class is in the process of disposing.(Inherited from Control.)

System_CAPS_pubpropertyDock

Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.(Inherited from Control.)

System_CAPS_protpropertyDoubleBuffered

Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.(Inherited from Control.)

System_CAPS_pubpropertyEditingControl

Gets the control hosted by the current cell, if a cell with an editing control is in edit mode.

System_CAPS_pubpropertyEditingPanel

Gets the panel that contains the EditingControl.

System_CAPS_pubpropertyEditMode

Gets or sets a value indicating how to begin editing a cell.

System_CAPS_pubpropertyEnabled

Gets or sets a value indicating whether the control can respond to user interaction.(Inherited from Control.)

System_CAPS_pubpropertyEnableHeadersVisualStyles

Gets or sets a value indicating whether row and column headers use the visual styles of the user's current theme if visual styles are enabled for the application.

System_CAPS_protpropertyEvents

Gets the list of event handlers that are attached to this Component.(Inherited from Component.)

System_CAPS_pubpropertyFirstDisplayedCell

Gets or sets the first cell currently displayed in the DataGridView; typically, this cell is in the upper left corner.

System_CAPS_pubpropertyFirstDisplayedScrollingColumnHiddenWidth

Gets the width of the portion of the column that is currently scrolled out of view..

System_CAPS_pubpropertyFirstDisplayedScrollingColumnIndex

Gets or sets the index of the column that is the first column displayed on the DataGridView.

System_CAPS_pubpropertyFirstDisplayedScrollingRowIndex

Gets or sets the index of the row that is the first row displayed on the DataGridView.

System_CAPS_pubpropertyFocused

Gets a value indicating whether the control has input focus.(Inherited from Control.)

System_CAPS_pubpropertyFont

Gets or sets the font of the text displayed by the DataGridView. (Overrides Control.Font.)

System_CAPS_protpropertyFontHeight

Gets or sets the height of the font of the control.(Inherited from Control.)

System_CAPS_pubpropertyForeColor

Gets or sets the foreground color of the DataGridView.(Overrides Control.ForeColor.)

System_CAPS_pubpropertyGridColor

Gets or sets the color of the grid lines separating the cells of the DataGridView.

System_CAPS_pubpropertyHandle

Gets the window handle that the control is bound to.(Inherited from Control.)

System_CAPS_pubpropertyHasChildren

Gets a value indicating whether the control contains one or more child controls.(Inherited from Control.)

System_CAPS_pubpropertyHeight

Gets or sets the height of the control.(Inherited from Control.)

System_CAPS_protpropertyHorizontalScrollBar

Gets the horizontal scroll bar of the control.

System_CAPS_pubpropertyHorizontalScrollingOffset

Gets or sets the number of pixels by which the control is scrolled horizontally.

System_CAPS_pubpropertyImeMode

Gets or sets the Input Method Editor (IME) mode of the control.(Inherited from Control.)

System_CAPS_protpropertyImeModeBase

Gets or sets the IME mode of a control.(Inherited from Control.)

System_CAPS_pubpropertyInvokeRequired

Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.(Inherited from Control.)

System_CAPS_pubpropertyIsAccessible

Gets or sets a value indicating whether the control is visible to accessibility applications.(Inherited from Control.)

System_CAPS_pubpropertyIsCurrentCellDirty

Gets a value indicating whether the current cell has uncommitted changes.

System_CAPS_pubpropertyIsCurrentCellInEditMode

Gets a value indicating whether the currently active cell is being edited.

System_CAPS_pubpropertyIsCurrentRowDirty

Gets a value indicating whether the current row has uncommitted changes.

System_CAPS_pubpropertyIsDisposed

Gets a value indicating whether the control has been disposed of.(Inherited from Control.)

System_CAPS_pubpropertyIsHandleCreated

Gets a value indicating whether the control has a handle associated with it.(Inherited from Control.)

System_CAPS_pubpropertyIsMirrored

Gets a value indicating whether the control is mirrored.(Inherited from Control.)

System_CAPS_pubpropertyItem[Int32, Int32]

Provides an indexer to get or set the cell located at the intersection of the column and row with the specified indexes.

System_CAPS_pubpropertyItem[String, Int32]

Provides an indexer to get or set the cell located at the intersection of the row with the specified index and the column with the specified name.

System_CAPS_pubpropertyLayoutEngine

Gets a cached instance of the control's layout engine.(Inherited from Control.)

System_CAPS_pubpropertyLeft

Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.(Inherited from Control.)

System_CAPS_pubpropertyLocation

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.(Inherited from Control.)

System_CAPS_pubpropertyMargin

Gets or sets the space between controls.(Inherited from Control.)

System_CAPS_pubpropertyMaximumSize

Gets or sets the size that is the upper limit that GetPreferredSize can specify.(Inherited from Control.)

System_CAPS_pubpropertyMinimumSize

Gets or sets the size that is the lower limit that GetPreferredSize can specify.(Inherited from Control.)

System_CAPS_pubpropertyMultiSelect

Gets or sets a value indicating whether the user is allowed to select more than one cell, row, or column of the DataGridView at a time.

System_CAPS_pubpropertyName

Gets or sets the name of the control.(Inherited from Control.)

System_CAPS_pubpropertyNewRowIndex

Gets the index of the row for new records.

System_CAPS_pubpropertyPadding

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant for this control.

System_CAPS_pubpropertyParent

Gets or sets the parent container of the control.(Inherited from Control.)

System_CAPS_pubpropertyPreferredSize

Gets the size of a rectangular area into which the control can fit.(Inherited from Control.)

System_CAPS_pubpropertyProductName

Gets the product name of the assembly containing the control.(Inherited from Control.)

System_CAPS_pubpropertyProductVersion

Gets the version of the assembly containing the control.(Inherited from Control.)

System_CAPS_pubpropertyReadOnly

Gets or sets a value indicating whether the user can edit the cells of the DataGridView control.

System_CAPS_pubpropertyRecreatingHandle

Gets a value indicating whether the control is currently re-creating its handle.(Inherited from Control.)

System_CAPS_pubpropertyRegion

Gets or sets the window region associated with the control.(Inherited from Control.)

System_CAPS_protpropertyRenderRightToLeft

Obsolete.This property is now obsolete.(Inherited from Control.)

System_CAPS_protpropertyResizeRedraw

Gets or sets a value indicating whether the control redraws itself when resized.(Inherited from Control.)

System_CAPS_pubpropertyRight

Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.(Inherited from Control.)

System_CAPS_pubpropertyRightToLeft

Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.(Inherited from Control.)

System_CAPS_pubpropertyRowCount

Gets or sets the number of rows displayed in the DataGridView.

System_CAPS_pubpropertyRowHeadersBorderStyle

Gets or sets the border style of the row header cells.

System_CAPS_pubpropertyRowHeadersDefaultCellStyle

Gets or sets the default style applied to the row header cells.

System_CAPS_pubpropertyRowHeadersVisible

Gets or sets a value indicating whether the column that contains row headers is displayed.

System_CAPS_pubpropertyRowHeadersWidth

Gets or sets the width, in pixels, of the column that contains the row headers.

System_CAPS_pubpropertyRowHeadersWidthSizeMode

Gets or sets a value indicating whether the width of the row headers is adjustable and whether it can be adjusted by the user or is automatically adjusted to fit the contents of the headers.

System_CAPS_pubpropertyRows

Gets a collection that contains all the rows in the DataGridView control.

System_CAPS_pubpropertyRowsDefaultCellStyle

Gets or sets the default style applied to the row cells of the DataGridView.

System_CAPS_pubpropertyRowTemplate

Gets or sets the row that represents the template for all the rows in the control.

System_CAPS_protpropertyScaleChildren

Gets a value that determines the scaling of child controls. (Inherited from Control.)

System_CAPS_pubpropertyScrollBars

Gets or sets the type of scroll bars to display for the DataGridView control.

System_CAPS_pubpropertySelectedCells

Gets the collection of cells selected by the user.

System_CAPS_pubpropertySelectedColumns

Gets the collection of columns selected by the user.

System_CAPS_pubpropertySelectedRows

Gets the collection of rows selected by the user.

System_CAPS_pubpropertySelectionMode

Gets or sets a value indicating how the cells of the DataGridView can be selected.

System_CAPS_pubpropertyShowCellErrors

Gets or sets a value indicating whether to show cell errors.

System_CAPS_pubpropertyShowCellToolTips

Gets or sets a value indicating whether or not ToolTips will show when the mouse pointer pauses on a cell.

System_CAPS_pubpropertyShowEditingIcon

Gets or sets a value indicating whether or not the editing glyph is visible in the row header of the cell being edited.

System_CAPS_protpropertyShowFocusCues

Gets a value indicating whether the control should display focus rectangles.(Inherited from Control.)

System_CAPS_protpropertyShowKeyboardCues

Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators.(Inherited from Control.)

System_CAPS_pubpropertyShowRowErrors

Gets or sets a value indicating whether row headers will display error glyphs for each row that contains a data entry error.

System_CAPS_pubpropertySite

Gets or sets the site of the control.(Inherited from Control.)

System_CAPS_pubpropertySize

Gets or sets the height and width of the control.(Inherited from Control.)

System_CAPS_pubpropertySortedColumn

Gets the column by which the DataGridView contents are currently sorted.

System_CAPS_pubpropertySortOrder

Gets a value indicating whether the items in the DataGridView control are sorted in ascending or descending order, or are not sorted.

System_CAPS_pubpropertyStandardTab

Gets or sets a value indicating whether the TAB key moves the focus to the next control in the tab order rather than moving focus to the next cell in the control.

System_CAPS_pubpropertyTabIndex

Gets or sets the tab order of the control within its container.(Inherited from Control.)

System_CAPS_pubpropertyTabStop

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.(Inherited from Control.)

System_CAPS_pubpropertyTag

Gets or sets the object that contains data about the control.(Inherited from Control.)

System_CAPS_pubpropertyText

This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the text associated with the control.(Overrides Control.Text.)

System_CAPS_pubpropertyTop

Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area.(Inherited from Control.)

System_CAPS_pubpropertyTopLeftHeaderCell

Gets or sets the header cell located in the upper left corner of the DataGridView control.

System_CAPS_pubpropertyTopLevelControl

Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in.(Inherited from Control.)

System_CAPS_pubpropertyUserSetCursor

Gets the default or user-specified value of the Cursor property.

System_CAPS_pubpropertyUseWaitCursor

Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.(Inherited from Control.)

System_CAPS_protpropertyVerticalScrollBar

Gets the vertical scroll bar of the control.

System_CAPS_pubpropertyVerticalScrollingOffset

Gets the number of pixels by which the control is scrolled vertically.

System_CAPS_pubpropertyVirtualMode

Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.

System_CAPS_pubpropertyVisible

Gets or sets a value indicating whether the control and all its child controls are displayed.(Inherited from Control.)

System_CAPS_pubpropertyWidth

Gets or sets the width of the control.(Inherited from Control.)

System_CAPS_pubpropertyWindowTarget

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

NameDescription
System_CAPS_protmethodAccessibilityNotifyClients(AccessibleEvents, Int32)

Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.(Inherited from Control.)

System_CAPS_protmethodAccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control .(Inherited from Control.)

System_CAPS_protmethodAccessibilityNotifyCurrentCellChanged(Point)

Notifies the accessible client applications when a new cell becomes the current cell.

System_CAPS_pubmethodAdjustColumnHeaderBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean)

Adjusts the DataGridViewAdvancedBorderStyle for a column header cell of a DataGridView that is currently being painted.

System_CAPS_pubmethodAreAllCellsSelected(Boolean)

Returns a value indicating whether all the DataGridView cells are currently selected.

System_CAPS_pubmethodAutoResizeColumn(Int32)

Adjusts the width of the specified column to fit the contents of all its cells, including the header cell.

System_CAPS_pubmethodAutoResizeColumn(Int32, DataGridViewAutoSizeColumnMode)

Adjusts the width of the specified column using the specified size mode.

System_CAPS_protmethodAutoResizeColumn(Int32, DataGridViewAutoSizeColumnMode, Boolean)

Adjusts the width of the specified column using the specified size mode, optionally calculating the width with the expectation that row heights will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeColumnHeadersHeight()

Adjusts the height of the column headers to fit the contents of the largest column header.

System_CAPS_protmethodAutoResizeColumnHeadersHeight(Boolean, Boolean)

Adjusts the height of the column headers to fit their contents, optionally calculating the height with the expectation that the column and/or row header widths will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeColumnHeadersHeight(Int32)

Adjusts the height of the column headers based on changes to the contents of the header in the specified column.

System_CAPS_protmethodAutoResizeColumnHeadersHeight(Int32, Boolean, Boolean)

Adjusts the height of the column headers based on changes to the contents of the header in the specified column, optionally calculating the height with the expectation that the column and/or row header widths will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeColumns()

Adjusts the width of all columns to fit the contents of all their cells, including the header cells.

System_CAPS_pubmethodAutoResizeColumns(DataGridViewAutoSizeColumnsMode)

Adjusts the width of all columns using the specified size mode.

System_CAPS_protmethodAutoResizeColumns(DataGridViewAutoSizeColumnsMode, Boolean)

Adjusts the width of all columns using the specified size mode, optionally calculating the widths with the expectation that row heights will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeRow(Int32)

Adjusts the height of the specified row to fit the contents of all its cells including the header cell.

System_CAPS_pubmethodAutoResizeRow(Int32, DataGridViewAutoSizeRowMode)

Adjusts the height of the specified row using the specified size mode.

System_CAPS_protmethodAutoResizeRow(Int32, DataGridViewAutoSizeRowMode, Boolean)

Adjusts the height of the specified row using the specified size mode, optionally calculating the height with the expectation that column widths will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode)

Adjusts the width of the row headers using the specified size mode.

System_CAPS_protmethodAutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode, Boolean, Boolean)

Adjusts the width of the row headers using the specified size mode, optionally calculating the width with the expectation that the row and/or column header widths will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeRowHeadersWidth(Int32, DataGridViewRowHeadersWidthSizeMode)

Adjusts the width of the row headers based on changes to the contents of the header in the specified row and using the specified size mode.

System_CAPS_protmethodAutoResizeRowHeadersWidth(Int32, DataGridViewRowHeadersWidthSizeMode, Boolean, Boolean)

Adjusts the width of the row headers based on changes to the contents of the header in the specified row and using the specified size mode, optionally calculating the width with the expectation that the row and/or column header widths will subsequently be adjusted.

System_CAPS_pubmethodAutoResizeRows()

Adjusts the heights of all rows to fit the contents of all their cells, including the header cells.

System_CAPS_pubmethodAutoResizeRows(DataGridViewAutoSizeRowsMode)

Adjusts the heights of the rows using the specified size mode value.

System_CAPS_protmethodAutoResizeRows(DataGridViewAutoSizeRowsMode, Boolean)

Adjusts the heights of all rows using the specified size mode, optionally calculating the heights with the expectation that column widths will subsequently be adjusted.

System_CAPS_protmethodAutoResizeRows(Int32, Int32, DataGridViewAutoSizeRowMode, Boolean)

Adjusts the heights of the specified rows using the specified size mode, optionally calculating the heights with the expectation that column widths will subsequently be adjusted.

System_CAPS_pubmethodBeginEdit(Boolean)

Puts the current cell in edit mode.

System_CAPS_pubmethodBeginInvoke(Delegate)

Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on.(Inherited from Control.)

System_CAPS_pubmethodBeginInvoke(Delegate, Object[])

Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.(Inherited from Control.)

System_CAPS_pubmethodBringToFront()

Brings the control to the front of the z-order.(Inherited from Control.)

System_CAPS_pubmethodCancelEdit()

Cancels edit mode for the currently selected cell and discards any changes.

System_CAPS_pubmethodClearSelection()

Clears the current selection by unselecting all selected cells.

System_CAPS_protmethodClearSelection(Int32, Int32, Boolean)

Cancels the selection of all currently selected cells except the one indicated, optionally ensuring that the indicated cell is selected.

System_CAPS_pubmethodCommitEdit(DataGridViewDataErrorContexts)

Commits changes in the current cell to the data cache without ending edit mode.

System_CAPS_pubmethodContains(Control)

Retrieves a value indicating whether the specified control is a child of the control.(Inherited from Control.)

System_CAPS_protmethodCreateAccessibilityInstance()

Creates a new accessible object for the DataGridView.(Overrides Control.CreateAccessibilityInstance().)

System_CAPS_protmethodCreateColumnsInstance()

Creates and returns a new DataGridViewColumnCollection.

System_CAPS_pubmethodCreateControl()

Forces the creation of the visible control, including the creation of the handle and any visible child controls.(Inherited from Control.)

System_CAPS_protmethodCreateControlsInstance()

Creates and returns a new Control.ControlCollection that can be cast to type DataGridView.DataGridViewControlCollection.(Overrides Control.CreateControlsInstance().)

System_CAPS_pubmethodCreateGraphics()

Creates the Graphics for the control.(Inherited from Control.)

System_CAPS_protmethodCreateHandle()

Creates a handle for the control.(Inherited from Control.)

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodCreateRowsInstance()

Creates and returns a new DataGridViewRowCollection.

System_CAPS_protmethodDefWndProc(Message)

Sends the specified message to the default window procedure.(Inherited from Control.)

System_CAPS_protmethodDestroyHandle()

Destroys the handle associated with the control.(Inherited from Control.)

System_CAPS_pubmethodDisplayedColumnCount(Boolean)

Returns the number of columns displayed to the user.

System_CAPS_pubmethodDisplayedRowCount(Boolean)

Returns the number of rows displayed to the user.

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the Control and its child controls and optionally releases the managed resources.(Overrides Control.Dispose(Boolean).)

System_CAPS_pubmethodDoDragDrop(Object, DragDropEffects)

Begins a drag-and-drop operation.(Inherited from Control.)

System_CAPS_pubmethodDrawToBitmap(Bitmap, Rectangle)

Supports rendering to the specified bitmap.(Inherited from Control.)

System_CAPS_pubmethodEndEdit()

Commits and ends the edit operation on the current cell using the default error context.

System_CAPS_pubmethodEndEdit(DataGridViewDataErrorContexts)

Commits and ends the edit operation on the current cell using the specified error context.

System_CAPS_pubmethodEndInvoke(IAsyncResult)

Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed.(Inherited from Control.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_pubmethodFindForm()

Retrieves the form that the control is on.(Inherited from Control.)

System_CAPS_pubmethodFocus()

Sets input focus to the control.(Inherited from Control.)

System_CAPS_protmethodGetAccessibilityObjectById(Int32)

Retrieves the specified AccessibleObject.(Overrides Control.GetAccessibilityObjectById(Int32).)

System_CAPS_protmethodGetAutoSizeMode()

Retrieves a value indicating how a control will behave when its AutoSize property is enabled.(Inherited from Control.)

System_CAPS_pubmethodGetCellCount(DataGridViewElementStates)

Gets the number of cells that satisfy the provided filter.

System_CAPS_pubmethodGetCellDisplayRectangle(Int32, Int32, Boolean)

Returns the rectangle that represents the display area for a cell.

System_CAPS_pubmethodGetChildAtPoint(Point)

Retrieves the child control that is located at the specified coordinates.(Inherited from Control.)

System_CAPS_pubmethodGetChildAtPoint(Point, GetChildAtPointSkip)

Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.(Inherited from Control.)

System_CAPS_pubmethodGetClipboardContent()

Retrieves the formatted values that represent the contents of the selected cells for copying to the Clipboard.

System_CAPS_pubmethodGetColumnDisplayRectangle(Int32, Boolean)

Returns the rectangle that represents the display area for a column, as determined by the column index.

System_CAPS_pubmethodGetContainerControl()

Returns the next ContainerControl up the control's chain of parent controls.(Inherited from Control.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetNextControl(Control, Boolean)

Retrieves the next control forward or back in the tab order of child controls.(Inherited from Control.)

System_CAPS_pubmethodGetPreferredSize(Size)

Retrieves the size of a rectangular area into which a control can be fitted.(Inherited from Control.)

System_CAPS_pubmethodGetRowDisplayRectangle(Int32, Boolean)

Returns the rectangle that represents the display area for a row, as determined by the row index.

System_CAPS_protmethodGetScaledBounds(Rectangle, SizeF, BoundsSpecified)

Retrieves the bounds within which the control is scaled.(Inherited from Control.)

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_protmethodGetStyle(ControlStyles)

Retrieves the value of the specified control style bit for the control.(Inherited from Control.)

System_CAPS_protmethodGetTopLevel()

Determines if the control is a top-level control.(Inherited from Control.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodHide()

Conceals the control from the user.(Inherited from Control.)

System_CAPS_pubmethodHitTest(Int32, Int32)

Returns location information, such as row and column indices, given x- and y-coordinates.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodInitLayout()

Called after the control has been added to another container.(Inherited from Control.)

System_CAPS_pubmethodInvalidate()

Invalidates the entire surface of the control and causes the control to be redrawn.(Inherited from Control.)

System_CAPS_pubmethodInvalidate(Boolean)

Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.(Inherited from Control.)

System_CAPS_pubmethodInvalidate(Rectangle)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.(Inherited from Control.)

System_CAPS_pubmethodInvalidate(Rectangle, Boolean)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.(Inherited from Control.)

System_CAPS_pubmethodInvalidate(Region)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.(Inherited from Control.)

System_CAPS_pubmethodInvalidate(Region, Boolean)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.(Inherited from Control.)

System_CAPS_pubmethodInvalidateCell(DataGridViewCell)

Invalidates the specified cell of the DataGridView, forcing it to be repainted.

System_CAPS_pubmethodInvalidateCell(Int32, Int32)

Invalidates the cell with the specified row and column indexes, forcing it to be repainted.

System_CAPS_pubmethodInvalidateColumn(Int32)

Invalidates the specified column of the DataGridView, forcing it to be repainted.

System_CAPS_pubmethodInvalidateRow(Int32)

Invalidates the specified row of the DataGridView, forcing it to be repainted.

System_CAPS_pubmethodInvoke(Delegate)

Executes the specified delegate on the thread that owns the control's underlying window handle.(Inherited from Control.)

System_CAPS_pubmethodInvoke(Delegate, Object[])

Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments.(Inherited from Control.)

System_CAPS_protmethodInvokeGotFocus(Control, EventArgs)

Raises the GotFocus event for the specified control.(Inherited from Control.)

System_CAPS_protmethodInvokeLostFocus(Control, EventArgs)

Raises the LostFocus event for the specified control.(Inherited from Control.)

System_CAPS_protmethodInvokeOnClick(Control, EventArgs)

Raises the Click event for the specified control.(Inherited from Control.)

System_CAPS_protmethodInvokePaint(Control, PaintEventArgs)

Raises the Paint event for the specified control.(Inherited from Control.)

System_CAPS_protmethodInvokePaintBackground(Control, PaintEventArgs)

Raises the PaintBackground event for the specified control.(Inherited from Control.)

System_CAPS_protmethodIsInputChar(Char)

Determines whether a character is an input character that the DataGridView recognizes.(Overrides Control.IsInputChar(Char).)

System_CAPS_protmethodIsInputKey(Keys)

Determines whether the specified key is a regular input key or a special key that requires preprocessing.(Overrides Control.IsInputKey(Keys).)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodNotifyCurrentCellDirty(Boolean)

Notifies the DataGridView that the current cell has uncommitted changes.

System_CAPS_protmethodNotifyInvalidate(Rectangle)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the Invalidated event with a specified region of the control to invalidate.(Inherited from Control.)

System_CAPS_protmethodOnAllowUserToAddRowsChanged(EventArgs)

Raises the AllowUserToAddRowsChanged event.

System_CAPS_protmethodOnAllowUserToDeleteRowsChanged(EventArgs)
System_CAPS_protmethodOnAllowUserToOrderColumnsChanged(EventArgs)
System_CAPS_protmethodOnAllowUserToResizeColumnsChanged(EventArgs)
System_CAPS_protmethodOnAllowUserToResizeRowsChanged(EventArgs)

Raises the AllowUserToResizeRowsChanged event.

System_CAPS_protmethodOnAlternatingRowsDefaultCellStyleChanged(EventArgs)
System_CAPS_protmethodOnAutoGenerateColumnsChanged(EventArgs)

Raises the AutoGenerateColumnsChanged event.

System_CAPS_protmethodOnAutoSizeChanged(EventArgs)

Raises the AutoSizeChanged event. (Inherited from Control.)

System_CAPS_protmethodOnAutoSizeColumnModeChanged(DataGridViewAutoSizeColumnModeEventArgs)

Raises the AutoSizeColumnModeChanged event.

System_CAPS_protmethodOnAutoSizeColumnsModeChanged(DataGridViewAutoSizeColumnsModeEventArgs)

Raises the AutoSizeColumnsModeChanged event.

System_CAPS_protmethodOnAutoSizeRowsModeChanged(DataGridViewAutoSizeModeEventArgs)

Raises the AutoSizeRowsModeChanged event.

System_CAPS_protmethodOnBackColorChanged(EventArgs)

Raises the BackColorChanged event.(Inherited from Control.)

System_CAPS_protmethodOnBackgroundColorChanged(EventArgs)

Raises the BackgroundColorChanged event.

System_CAPS_protmethodOnBackgroundImageChanged(EventArgs)

Raises the BackgroundImageChanged event.(Inherited from Control.)

System_CAPS_protmethodOnBackgroundImageLayoutChanged(EventArgs)

Raises the BackgroundImageLayoutChanged event.(Inherited from Control.)

System_CAPS_protmethodOnBindingContextChanged(EventArgs)
System_CAPS_protmethodOnBorderStyleChanged(EventArgs)

Raises the BorderStyleChanged event.

System_CAPS_protmethodOnCancelRowEdit(QuestionEventArgs)

Raises the CancelRowEdit event.

System_CAPS_protmethodOnCausesValidationChanged(EventArgs)

Raises the CausesValidationChanged event.(Inherited from Control.)

System_CAPS_protmethodOnCellBeginEdit(DataGridViewCellCancelEventArgs)

Raises the CellBeginEdit event.

System_CAPS_protmethodOnCellBorderStyleChanged(EventArgs)

Raises the CellBorderStyleChanged event.

System_CAPS_protmethodOnCellClick(DataGridViewCellEventArgs)

Raises the CellClick event.

System_CAPS_protmethodOnCellContentClick(DataGridViewCellEventArgs)

Raises the CellContentClick event.

System_CAPS_protmethodOnCellContentDoubleClick(DataGridViewCellEventArgs)

Raises the CellContentDoubleClick event.

System_CAPS_protmethodOnCellContextMenuStripChanged(DataGridViewCellEventArgs)

Raises the CellContextMenuStripChanged event.

System_CAPS_protmethodOnCellContextMenuStripNeeded(DataGridViewCellContextMenuStripNeededEventArgs)

Raises the CellContextMenuStripNeeded event.

System_CAPS_protmethodOnCellDoubleClick(DataGridViewCellEventArgs)

Raises the CellDoubleClick event.

System_CAPS_protmethodOnCellEndEdit(DataGridViewCellEventArgs)

Raises the CellEndEdit event.

System_CAPS_protmethodOnCellEnter(DataGridViewCellEventArgs)

Raises the CellEnter event.

System_CAPS_protmethodOnCellErrorTextChanged(DataGridViewCellEventArgs)

Raises the CellErrorTextChanged event.

System_CAPS_protmethodOnCellErrorTextNeeded(DataGridViewCellErrorTextNeededEventArgs)

Raises the CellErrorTextNeeded event.

System_CAPS_protmethodOnCellFormatting(DataGridViewCellFormattingEventArgs)

Raises the CellFormatting event.

System_CAPS_protmethodOnCellLeave(DataGridViewCellEventArgs)

Raises the CellLeave event.

System_CAPS_protmethodOnCellMouseClick(DataGridViewCellMouseEventArgs)

Raises the CellMouseClick event.

System_CAPS_protmethodOnCellMouseDoubleClick(DataGridViewCellMouseEventArgs)

Raises the CellMouseDoubleClick event.

System_CAPS_protmethodOnCellMouseDown(DataGridViewCellMouseEventArgs)

Raises the CellMouseDown event.

System_CAPS_protmethodOnCellMouseEnter(DataGridViewCellEventArgs)

Raises the CellMouseEnter event.

System_CAPS_protmethodOnCellMouseLeave(DataGridViewCellEventArgs)

Raises the CellMouseLeave event.

System_CAPS_protmethodOnCellMouseMove(DataGridViewCellMouseEventArgs)

Raises the CellMouseMove event.

System_CAPS_protmethodOnCellMouseUp(DataGridViewCellMouseEventArgs)

Raises the CellMouseUp event.

System_CAPS_protmethodOnCellPainting(DataGridViewCellPaintingEventArgs)

Raises the CellPainting event.

System_CAPS_protmethodOnCellParsing(DataGridViewCellParsingEventArgs)

Raises the CellParsing event.

System_CAPS_protmethodOnCellStateChanged(DataGridViewCellStateChangedEventArgs)

Raises the CellStateChanged event.

System_CAPS_protmethodOnCellStyleChanged(DataGridViewCellEventArgs)

Raises the CellStyleChanged event.

System_CAPS_protmethodOnCellStyleContentChanged(DataGridViewCellStyleContentChangedEventArgs)

Raises the CellStyleContentChanged event.

System_CAPS_protmethodOnCellToolTipTextChanged(DataGridViewCellEventArgs)

Raises the CellToolTipTextChanged event.

System_CAPS_protmethodOnCellToolTipTextNeeded(DataGridViewCellToolTipTextNeededEventArgs)

Raises the CellToolTipTextNeeded event.

System_CAPS_protmethodOnCellValidated(DataGridViewCellEventArgs)

Raises the CellValidated event.

System_CAPS_protmethodOnCellValidating(DataGridViewCellValidatingEventArgs)

Raises the CellValidating event.

System_CAPS_protmethodOnCellValueChanged(DataGridViewCellEventArgs)

Raises the CellValueChanged event.

System_CAPS_protmethodOnCellValueNeeded(DataGridViewCellValueEventArgs)

Raises the CellValueNeeded event.

System_CAPS_protmethodOnCellValuePushed(DataGridViewCellValueEventArgs)

Raises the CellValuePushed event.

System_CAPS_protmethodOnChangeUICues(UICuesEventArgs)

Raises the ChangeUICues event.(Inherited from Control.)

System_CAPS_protmethodOnClick(EventArgs)

Raises the Click event.(Inherited from Control.)

System_CAPS_protmethodOnClientSizeChanged(EventArgs)

Raises the ClientSizeChanged event. (Inherited from Control.)

System_CAPS_protmethodOnColumnAdded(DataGridViewColumnEventArgs)

Raises the ColumnAdded event.

System_CAPS_protmethodOnColumnContextMenuStripChanged(DataGridViewColumnEventArgs)
System_CAPS_protmethodOnColumnDataPropertyNameChanged(DataGridViewColumnEventArgs)
System_CAPS_protmethodOnColumnDefaultCellStyleChanged(DataGridViewColumnEventArgs)
System_CAPS_protmethodOnColumnDisplayIndexChanged(DataGridViewColumnEventArgs)

Raises the ColumnDisplayIndexChanged event.

System_CAPS_protmethodOnColumnDividerDoubleClick(DataGridViewColumnDividerDoubleClickEventArgs)

Raises the ColumnDividerDoubleClick event.

System_CAPS_protmethodOnColumnDividerWidthChanged(DataGridViewColumnEventArgs)

Raises the ColumnDividerWidthChanged event.

System_CAPS_protmethodOnColumnHeaderCellChanged(DataGridViewColumnEventArgs)

Raises the ColumnHeaderCellChanged event.

System_CAPS_protmethodOnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs)

Raises the ColumnHeaderMouseClick event.

System_CAPS_protmethodOnColumnHeaderMouseDoubleClick(DataGridViewCellMouseEventArgs)
System_CAPS_protmethodOnColumnHeadersBorderStyleChanged(EventArgs)
System_CAPS_protmethodOnColumnHeadersDefaultCellStyleChanged(EventArgs)
System_CAPS_protmethodOnColumnHeadersHeightChanged(EventArgs)

Raises the ColumnHeadersHeightChanged event.

System_CAPS_protmethodOnColumnHeadersHeightSizeModeChanged(DataGridViewAutoSizeModeEventArgs)
System_CAPS_protmethodOnColumnMinimumWidthChanged(DataGridViewColumnEventArgs)

Raises the ColumnMinimumWidthChanged event.

System_CAPS_protmethodOnColumnNameChanged(DataGridViewColumnEventArgs)

Raises the ColumnNameChanged event.

System_CAPS_protmethodOnColumnRemoved(DataGridViewColumnEventArgs)

Raises the ColumnRemoved event.

System_CAPS_protmethodOnColumnSortModeChanged(DataGridViewColumnEventArgs)

Raises the ColumnSortModeChanged event.

System_CAPS_protmethodOnColumnStateChanged(DataGridViewColumnStateChangedEventArgs)

Raises the ColumnStateChanged event.

System_CAPS_protmethodOnColumnToolTipTextChanged(DataGridViewColumnEventArgs)

Raises the ColumnToolTipTextChanged event.

System_CAPS_protmethodOnColumnWidthChanged(DataGridViewColumnEventArgs)

Raises the ColumnWidthChanged event.

System_CAPS_protmethodOnContextMenuChanged(EventArgs)

Raises the ContextMenuChanged event.(Inherited from Control.)

System_CAPS_protmethodOnContextMenuStripChanged(EventArgs)

Raises the ContextMenuStripChanged event.(Inherited from Control.)

System_CAPS_protmethodOnControlAdded(ControlEventArgs)

Raises the ControlAdded event.(Inherited from Control.)

System_CAPS_protmethodOnControlRemoved(ControlEventArgs)

Raises the ControlRemoved event.(Inherited from Control.)

System_CAPS_protmethodOnCreateControl()

Raises the CreateControl method.(Inherited from Control.)

System_CAPS_protmethodOnCurrentCellChanged(EventArgs)

Raises the CurrentCellChanged event.

System_CAPS_protmethodOnCurrentCellDirtyStateChanged(EventArgs)
System_CAPS_protmethodOnCursorChanged(EventArgs)

Raises the CursorChanged event and updates the UserSetCursor property if the cursor was changed in user code.(Overrides Control.OnCursorChanged(EventArgs).)

System_CAPS_protmethodOnDataBindingComplete(DataGridViewBindingCompleteEventArgs)

Raises the DataBindingComplete event.

System_CAPS_protmethodOnDataError(Boolean, DataGridViewDataErrorEventArgs)

Raises the DataError event.

System_CAPS_protmethodOnDataMemberChanged(EventArgs)

Raises the DataMemberChanged event.

System_CAPS_protmethodOnDataSourceChanged(EventArgs)

Raises the DataSourceChanged event.

System_CAPS_protmethodOnDefaultCellStyleChanged(EventArgs)

Raises the DefaultCellStyleChanged event.

System_CAPS_protmethodOnDefaultValuesNeeded(DataGridViewRowEventArgs)

Raises the DefaultValuesNeeded event.

System_CAPS_protmethodOnDockChanged(EventArgs)

Raises the DockChanged event.(Inherited from Control.)

System_CAPS_protmethodOnDoubleClick(EventArgs)

Raises the DoubleClick event. (Overrides Control.OnDoubleClick(EventArgs).)

System_CAPS_protmethodOnDragDrop(DragEventArgs)

Raises the DragDrop event.(Inherited from Control.)

System_CAPS_protmethodOnDragEnter(DragEventArgs)

Raises the DragEnter event.(Inherited from Control.)

System_CAPS_protmethodOnDragLeave(EventArgs)

Raises the DragLeave event.(Inherited from Control.)

System_CAPS_protmethodOnDragOver(DragEventArgs)

Raises the DragOver event.(Inherited from Control.)

System_CAPS_protmethodOnEditingControlShowing(DataGridViewEditingControlShowingEventArgs)

Raises the EditingControlShowing event.

System_CAPS_protmethodOnEditModeChanged(EventArgs)

Raises the EditModeChanged event.

System_CAPS_protmethodOnEnabledChanged(EventArgs)
System_CAPS_protmethodOnEnter(EventArgs)

Raises the Enter event.(Overrides Control.OnEnter(EventArgs).)

System_CAPS_protmethodOnFontChanged(EventArgs)

Raises the FontChanged event.(Overrides Control.OnFontChanged(EventArgs).)

System_CAPS_protmethodOnForeColorChanged(EventArgs)
System_CAPS_protmethodOnGiveFeedback(GiveFeedbackEventArgs)

Raises the GiveFeedback event.(Inherited from Control.)

System_CAPS_protmethodOnGotFocus(EventArgs)

Raises the GotFocus event.(Overrides Control.OnGotFocus(EventArgs).)

System_CAPS_protmethodOnGridColorChanged(EventArgs)

Raises the GridColorChanged event.

System_CAPS_protmethodOnHandleCreated(EventArgs)
System_CAPS_protmethodOnHandleDestroyed(EventArgs)
System_CAPS_protmethodOnHelpRequested(HelpEventArgs)

Raises the HelpRequested event.(Inherited from Control.)

System_CAPS_protmethodOnImeModeChanged(EventArgs)

Raises the ImeModeChanged event.(Inherited from Control.)

System_CAPS_protmethodOnInvalidated(InvalidateEventArgs)

Raises the Invalidated event.(Inherited from Control.)

System_CAPS_protmethodOnKeyDown(KeyEventArgs)

Raises the KeyDown event.(Overrides Control.OnKeyDown(KeyEventArgs).)

System_CAPS_protmethodOnKeyPress(KeyPressEventArgs)

Raises the KeyPress event.(Overrides Control.OnKeyPress(KeyPressEventArgs).)

System_CAPS_protmethodOnKeyUp(KeyEventArgs)

Raises the KeyUp event.(Overrides Control.OnKeyUp(KeyEventArgs).)

System_CAPS_protmethodOnLayout(LayoutEventArgs)

Raises the Layout event.(Overrides Control.OnLayout(LayoutEventArgs).)

System_CAPS_protmethodOnLeave(EventArgs)

Raises the Leave event.(Overrides Control.OnLeave(EventArgs).)

System_CAPS_protmethodOnLocationChanged(EventArgs)

Raises the LocationChanged event.(Inherited from Control.)

System_CAPS_protmethodOnLostFocus(EventArgs)

Raises the LostFocus event.(Overrides Control.OnLostFocus(EventArgs).)

System_CAPS_protmethodOnMarginChanged(EventArgs)

Raises the MarginChanged event. (Inherited from Control.)

System_CAPS_protmethodOnMouseCaptureChanged(EventArgs)

Raises the MouseCaptureChanged event.(Inherited from Control.)

System_CAPS_protmethodOnMouseClick(MouseEventArgs)

Raises the MouseClick event.(Overrides Control.OnMouseClick(MouseEventArgs).)

System_CAPS_protmethodOnMouseDoubleClick(MouseEventArgs)
System_CAPS_protmethodOnMouseDown(MouseEventArgs)

Raises the MouseDown event.(Overrides Control.OnMouseDown(MouseEventArgs).)

System_CAPS_protmethodOnMouseEnter(EventArgs)

Raises the OnMouseEnter event.(Overrides Control.OnMouseEnter(EventArgs).)

System_CAPS_protmethodOnMouseHover(EventArgs)

Raises the MouseHover event.(Inherited from Control.)

System_CAPS_protmethodOnMouseLeave(EventArgs)

Raises the MouseLeave event.(Overrides Control.OnMouseLeave(EventArgs).)

System_CAPS_protmethodOnMouseMove(MouseEventArgs)

Raises the MouseMove event.(Overrides Control.OnMouseMove(MouseEventArgs).)

System_CAPS_protmethodOnMouseUp(MouseEventArgs)

Raises the MouseUp event.(Overrides Control.OnMouseUp(MouseEventArgs).)

System_CAPS_protmethodOnMouseWheel(MouseEventArgs)

Raises the MouseWheel event.(Overrides Control.OnMouseWheel(MouseEventArgs).)

System_CAPS_protmethodOnMove(EventArgs)

Raises the Move event.(Inherited from Control.)

System_CAPS_protmethodOnMultiSelectChanged(EventArgs)

Raises the MultiSelectChanged event.

System_CAPS_protmethodOnNewRowNeeded(DataGridViewRowEventArgs)

Raises the NewRowNeeded event.

System_CAPS_protmethodOnNotifyMessage(Message)

Notifies the control of Windows messages.(Inherited from Control.)

System_CAPS_protmethodOnPaddingChanged(EventArgs)

Raises the PaddingChanged event.(Inherited from Control.)

System_CAPS_protmethodOnPaint(PaintEventArgs)

Raises the Paint event.(Overrides Control.OnPaint(PaintEventArgs).)

System_CAPS_protmethodOnPaintBackground(PaintEventArgs)

Paints the background of the control.(Inherited from Control.)

System_CAPS_protmethodOnParentBackColorChanged(EventArgs)

Raises the BackColorChanged event when the BackColor property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentBackgroundImageChanged(EventArgs)

Raises the BackgroundImageChanged event when the BackgroundImage property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentBindingContextChanged(EventArgs)

Raises the BindingContextChanged event when the BindingContext property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentChanged(EventArgs)

Raises the ParentChanged event.(Inherited from Control.)

System_CAPS_protmethodOnParentCursorChanged(EventArgs)

Raises the CursorChanged event.(Inherited from Control.)

System_CAPS_protmethodOnParentEnabledChanged(EventArgs)

Raises the EnabledChanged event when the Enabled property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentFontChanged(EventArgs)

Raises the FontChanged event when the Font property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentForeColorChanged(EventArgs)

Raises the ForeColorChanged event when the ForeColor property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentRightToLeftChanged(EventArgs)

Raises the RightToLeftChanged event when the RightToLeft property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnParentVisibleChanged(EventArgs)

Raises the VisibleChanged event when the Visible property value of the control's container changes.(Inherited from Control.)

System_CAPS_protmethodOnPreviewKeyDown(PreviewKeyDownEventArgs)

Raises the PreviewKeyDown event.(Inherited from Control.)

System_CAPS_protmethodOnPrint(PaintEventArgs)

Raises the Paint event. (Inherited from Control.)

System_CAPS_protmethodOnQueryContinueDrag(QueryContinueDragEventArgs)

Raises the QueryContinueDrag event.(Inherited from Control.)

System_CAPS_protmethodOnReadOnlyChanged(EventArgs)

Raises the ReadOnlyChanged event.

System_CAPS_protmethodOnRegionChanged(EventArgs)

Raises the RegionChanged event. (Inherited from Control.)

System_CAPS_protmethodOnResize(EventArgs)

Raises the Resize event.(Overrides Control.OnResize(EventArgs).)

System_CAPS_protmethodOnRightToLeftChanged(EventArgs)
System_CAPS_protmethodOnRowContextMenuStripChanged(DataGridViewRowEventArgs)

Raises the RowContextMenuStripChanged event.

System_CAPS_protmethodOnRowContextMenuStripNeeded(DataGridViewRowContextMenuStripNeededEventArgs)

Raises the RowContextMenuStripNeeded event.

System_CAPS_protmethodOnRowDefaultCellStyleChanged(DataGridViewRowEventArgs)

Raises the RowDefaultCellStyleChanged event.

System_CAPS_protmethodOnRowDirtyStateNeeded(QuestionEventArgs)

Raises the RowDirtyStateNeeded event.

System_CAPS_protmethodOnRowDividerDoubleClick(DataGridViewRowDividerDoubleClickEventArgs)

Raises the RowDividerDoubleClick event.

System_CAPS_protmethodOnRowDividerHeightChanged(DataGridViewRowEventArgs)

Raises the RowDividerHeightChanged event.

System_CAPS_protmethodOnRowEnter(DataGridViewCellEventArgs)

Raises the RowEnter event.

System_CAPS_protmethodOnRowErrorTextChanged(DataGridViewRowEventArgs)

Raises the RowErrorTextChanged event.

System_CAPS_protmethodOnRowErrorTextNeeded(DataGridViewRowErrorTextNeededEventArgs)

Raises the RowErrorTextNeeded event.

System_CAPS_protmethodOnRowHeaderCellChanged(DataGridViewRowEventArgs)

Raises the RowHeaderCellChanged event.

System_CAPS_protmethodOnRowHeaderMouseClick(DataGridViewCellMouseEventArgs)

Raises the RowHeaderMouseClick event.

System_CAPS_protmethodOnRowHeaderMouseDoubleClick(DataGridViewCellMouseEventArgs)

Raises the RowHeaderMouseDoubleClick event.

System_CAPS_protmethodOnRowHeadersBorderStyleChanged(EventArgs)

Raises the RowHeadersBorderStyleChanged event.

System_CAPS_protmethodOnRowHeadersDefaultCellStyleChanged(EventArgs)
System_CAPS_protmethodOnRowHeadersWidthChanged(EventArgs)

Raises the RowHeadersWidthChanged event.

System_CAPS_protmethodOnRowHeadersWidthSizeModeChanged(DataGridViewAutoSizeModeEventArgs)
System_CAPS_protmethodOnRowHeightChanged(DataGridViewRowEventArgs)

Raises the RowHeightChanged event.

System_CAPS_protmethodOnRowHeightInfoNeeded(DataGridViewRowHeightInfoNeededEventArgs)

Raises the RowHeightInfoNeeded event.

System_CAPS_protmethodOnRowHeightInfoPushed(DataGridViewRowHeightInfoPushedEventArgs)

Raises the RowHeightInfoPushed event.

System_CAPS_protmethodOnRowLeave(DataGridViewCellEventArgs)

Raises the RowLeave event.

System_CAPS_protmethodOnRowMinimumHeightChanged(DataGridViewRowEventArgs)

Raises the RowMinimumHeightChanged event.

System_CAPS_protmethodOnRowPostPaint(DataGridViewRowPostPaintEventArgs)

Raises the RowPostPaint event.

System_CAPS_protmethodOnRowPrePaint(DataGridViewRowPrePaintEventArgs)

Raises the RowPrePaint event.

System_CAPS_protmethodOnRowsAdded(DataGridViewRowsAddedEventArgs)

Raises the RowsAdded event.

System_CAPS_protmethodOnRowsDefaultCellStyleChanged(EventArgs)

Raises the RowsDefaultCellStyleChanged event.

System_CAPS_protmethodOnRowsRemoved(DataGridViewRowsRemovedEventArgs)

Raises the RowsRemoved event.

System_CAPS_protmethodOnRowStateChanged(Int32, DataGridViewRowStateChangedEventArgs)

Raises the RowStateChanged event.

System_CAPS_protmethodOnRowUnshared(DataGridViewRowEventArgs)

Raises the RowUnshared event.

System_CAPS_protmethodOnRowValidated(DataGridViewCellEventArgs)

Raises the RowValidated event.

System_CAPS_protmethodOnRowValidating(DataGridViewCellCancelEventArgs)

Raises the RowValidating event.

System_CAPS_protmethodOnScroll(ScrollEventArgs)

Raises the Scroll event.

System_CAPS_protmethodOnSelectionChanged(EventArgs)

Raises the SelectionChanged event.

System_CAPS_protmethodOnSizeChanged(EventArgs)

Raises the SizeChanged event.(Inherited from Control.)

System_CAPS_protmethodOnSortCompare(DataGridViewSortCompareEventArgs)

Raises the SortCompare event.

System_CAPS_protmethodOnSorted(EventArgs)

Raises the Sorted event.

System_CAPS_protmethodOnStyleChanged(EventArgs)

Raises the StyleChanged event.(Inherited from Control.)

System_CAPS_protmethodOnSystemColorsChanged(EventArgs)

Raises the SystemColorsChanged event.(Inherited from Control.)

System_CAPS_protmethodOnTabIndexChanged(EventArgs)

Raises the TabIndexChanged event.(Inherited from Control.)

System_CAPS_protmethodOnTabStopChanged(EventArgs)

Raises the TabStopChanged event.(Inherited from Control.)

System_CAPS_protmethodOnTextChanged(EventArgs)

Raises the TextChanged event.(Inherited from Control.)

System_CAPS_protmethodOnUserAddedRow(DataGridViewRowEventArgs)

Raises the UserAddedRow event.

System_CAPS_protmethodOnUserDeletedRow(DataGridViewRowEventArgs)

Raises the UserDeletedRow event.

System_CAPS_protmethodOnUserDeletingRow(DataGridViewRowCancelEventArgs)

Raises the UserDeletingRow event.

System_CAPS_protmethodOnValidated(EventArgs)

Raises the Validated event.(Inherited from Control.)

System_CAPS_protmethodOnValidating(CancelEventArgs)
System_CAPS_protmethodOnVisibleChanged(EventArgs)
System_CAPS_protmethodPaintBackground(Graphics, Rectangle, Rectangle)

Paints the background of the DataGridView.

System_CAPS_pubmethodPerformLayout()

Forces the control to apply layout logic to all its child controls.(Inherited from Control.)

System_CAPS_pubmethodPerformLayout(Control, String)

Forces the control to apply layout logic to all its child controls.(Inherited from Control.)

System_CAPS_pubmethodPointToClient(Point)

Computes the location of the specified screen point into client coordinates.(Inherited from Control.)

System_CAPS_pubmethodPointToScreen(Point)

Computes the location of the specified client point into screen coordinates.(Inherited from Control.)

System_CAPS_pubmethodPreProcessControlMessage(Message)

Preprocesses keyboard or input messages within the message loop before they are dispatched.(Inherited from Control.)

System_CAPS_pubmethodPreProcessMessage(Message)

Preprocesses keyboard or input messages within the message loop before they are dispatched.(Inherited from Control.)

System_CAPS_protmethodProcessAKey(Keys)

Processes the A key.

System_CAPS_protmethodProcessCmdKey(Message, Keys)

Processes a command key.(Inherited from Control.)

System_CAPS_protmethodProcessDataGridViewKey(KeyEventArgs)

Processes keys used for navigating in the DataGridView.

System_CAPS_protmethodProcessDeleteKey(Keys)

Processes the DELETE key.

System_CAPS_protmethodProcessDialogChar(Char)

Processes a dialog character.(Inherited from Control.)

System_CAPS_protmethodProcessDialogKey(Keys)

Processes keys, such as the TAB, ESCAPE, ENTER, and ARROW keys, used to control dialog boxes.(Overrides Control.ProcessDialogKey(Keys).)

System_CAPS_protmethodProcessDownKey(Keys)

Processes the DOWN ARROW key.

System_CAPS_protmethodProcessEndKey(Keys)

Processes the END key.

System_CAPS_protmethodProcessEnterKey(Keys)

Processes the ENTER key.

System_CAPS_protmethodProcessEscapeKey(Keys)

Processes the ESC key.

System_CAPS_protmethodProcessF2Key(Keys)

Processes the F2 key.

System_CAPS_protmethodProcessHomeKey(Keys)

Processes the HOME key.

System_CAPS_protmethodProcessInsertKey(Keys)

Processes the INSERT key.

System_CAPS_protmethodProcessKeyEventArgs(Message)

Processes a key message and generates the appropriate control events.(Overrides Control.ProcessKeyEventArgs(Message).)

System_CAPS_protmethodProcessKeyMessage(Message)

Processes a keyboard message.(Inherited from Control.)

System_CAPS_protmethodProcessKeyPreview(Message)

Previews a keyboard message.(Overrides Control.ProcessKeyPreview(Message).)

System_CAPS_protmethodProcessLeftKey(Keys)

Processes the LEFT ARROW key.

System_CAPS_protmethodProcessMnemonic(Char)

Processes a mnemonic character.(Inherited from Control.)

System_CAPS_protmethodProcessNextKey(Keys)

Processes the PAGE DOWN key.

System_CAPS_protmethodProcessPriorKey(Keys)

Processes the PAGE UP key.

System_CAPS_protmethodProcessRightKey(Keys)

Processes the RIGHT ARROW key.

System_CAPS_protmethodProcessSpaceKey(Keys)

Processes the SPACEBAR.

System_CAPS_protmethodProcessTabKey(Keys)

Processes the TAB key.

System_CAPS_protmethodProcessUpKey(Keys)

Processes the UP ARROW key.

System_CAPS_protmethodProcessZeroKey(Keys)

Processes the 0 key.

System_CAPS_protmethodRaiseDragEvent(Object, DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate drag event.(Inherited from Control.)

System_CAPS_protmethodRaiseKeyEvent(Object, KeyEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate key event.(Inherited from Control.)

System_CAPS_protmethodRaiseMouseEvent(Object, MouseEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate mouse event.(Inherited from Control.)

System_CAPS_protmethodRaisePaintEvent(Object, PaintEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate paint event.(Inherited from Control.)

System_CAPS_protmethodRecreateHandle()

Forces the re-creation of the handle for the control.(Inherited from Control.)

System_CAPS_pubmethodRectangleToClient(Rectangle)

Computes the size and location of the specified screen rectangle in client coordinates.(Inherited from Control.)

System_CAPS_pubmethodRectangleToScreen(Rectangle)

Computes the size and location of the specified client rectangle in screen coordinates.(Inherited from Control.)

System_CAPS_pubmethodRefresh()

Forces the control to invalidate its client area and immediately redraw itself and any child controls.(Inherited from Control.)

System_CAPS_pubmethodRefreshEdit()

Refreshes the value of the current cell with the underlying cell value when the cell is in edit mode, discarding any previous value.

System_CAPS_pubmethodResetBackColor()

Resets the BackColor property to its default value.(Inherited from Control.)

System_CAPS_pubmethodResetBindings()

Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values.(Inherited from Control.)

System_CAPS_pubmethodResetCursor()

Resets the Cursor property to its default value.(Inherited from Control.)

System_CAPS_pubmethodResetFont()

Resets the Font property to its default value.(Inherited from Control.)

System_CAPS_pubmethodResetForeColor()

Resets the ForeColor property to its default value.(Inherited from Control.)

System_CAPS_pubmethodResetImeMode()

Resets the ImeMode property to its default value.(Inherited from Control.)

System_CAPS_protmethodResetMouseEventArgs()

This API supports the product infrastructure and is not intended to be used directly from your code. Resets the control to handle the MouseLeave event.(Inherited from Control.)

System_CAPS_pubmethodResetRightToLeft()

Resets the RightToLeft property to its default value.(Inherited from Control.)

System_CAPS_pubmethodResetText()

This API supports the product infrastructure and is not intended to be used directly from your code. Resets the Text property to its default value.(Overrides Control.ResetText().)

System_CAPS_pubmethodResumeLayout()

Resumes usual layout logic.(Inherited from Control.)

System_CAPS_pubmethodResumeLayout(Boolean)

Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.(Inherited from Control.)

System_CAPS_protmethodRtlTranslateAlignment(ContentAlignment)

Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.(Inherited from Control.)

System_CAPS_protmethodRtlTranslateAlignment(HorizontalAlignment)

Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text.(Inherited from Control.)

System_CAPS_protmethodRtlTranslateAlignment(LeftRightAlignment)

Converts the specified LeftRightAlignment to the appropriate LeftRightAlignment to support right-to-left text.(Inherited from Control.)

System_CAPS_protmethodRtlTranslateContent(ContentAlignment)

Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.(Inherited from Control.)

System_CAPS_protmethodRtlTranslateHorizontal(HorizontalAlignment)

Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text.(Inherited from Control.)

System_CAPS_protmethodRtlTranslateLeftRight(LeftRightAlignment)

Converts the specified LeftRightAlignment to the appropriate LeftRightAlignment to support right-to-left text.(Inherited from Control.)

System_CAPS_pubmethodScale(Single)

Obsolete.Scales the control and any child controls.(Inherited from Control.)

System_CAPS_pubmethodScale(Single, Single)

Obsolete.Scales the entire control and any child controls.(Inherited from Control.)

System_CAPS_pubmethodScale(SizeF)

Scales the control and all child controls by the specified scaling factor.(Inherited from Control.)

System_CAPS_protmethodScaleControl(SizeF, BoundsSpecified)

Scales a control's location, size, padding and margin.(Inherited from Control.)

System_CAPS_protmethodScaleCore(Single, Single)

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

System_CAPS_pubmethodSelect()

Activates the control.(Inherited from Control.)

System_CAPS_protmethodSelect(Boolean, Boolean)

Activates a child control. Optionally specifies the direction in the tab order to select the control from.(Inherited from Control.)

System_CAPS_pubmethodSelectAll()

Selects all the cells in the DataGridView.

System_CAPS_pubmethodSelectNextControl(Control, Boolean, Boolean, Boolean, Boolean)

Activates the next control.(Inherited from Control.)

System_CAPS_pubmethodSendToBack()

Sends the control to the back of the z-order.(Inherited from Control.)

System_CAPS_protmethodSetAutoSizeMode(AutoSizeMode)

Sets a value indicating how a control will behave when its AutoSize property is enabled.(Inherited from Control.)

System_CAPS_pubmethodSetBounds(Int32, Int32, Int32, Int32)

Sets the bounds of the control to the specified location and size.(Inherited from Control.)

System_CAPS_pubmethodSetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)

Sets the specified bounds of the control to the specified location and size.(Inherited from Control.)

System_CAPS_protmethodSetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
System_CAPS_protmethodSetClientSizeCore(Int32, Int32)

Sets the size of the client area of the control.(Inherited from Control.)

System_CAPS_protmethodSetCurrentCellAddressCore(Int32, Int32, Boolean, Boolean, Boolean)

Sets the currently active cell.

System_CAPS_protmethodSetSelectedCellCore(Int32, Int32, Boolean)

Changes the selection state of the cell with the specified row and column indexes.

System_CAPS_protmethodSetSelectedColumnCore(Int32, Boolean)

Changes the selection state of the column with the specified index.

System_CAPS_protmethodSetSelectedRowCore(Int32, Boolean)

Changes the selection state of the row with the specified index.

System_CAPS_protmethodSetStyle(ControlStyles, Boolean)

Sets a specified ControlStyles flag to either true or false.(Inherited from Control.)

System_CAPS_protmethodSetTopLevel(Boolean)

Sets the control as the top-level control.(Inherited from Control.)

System_CAPS_protmethodSetVisibleCore(Boolean)

Sets the control to the specified visible state.(Inherited from Control.)

System_CAPS_pubmethodShow()

Displays the control to the user.(Inherited from Control.)

System_CAPS_protmethodSizeFromClientSize(Size)

Determines the size of the entire control from the height and width of its client area.(Inherited from Control.)

System_CAPS_pubmethodSort(DataGridViewColumn, ListSortDirection)

Sorts the contents of the DataGridView control in ascending or descending order based on the contents of the specified column.

System_CAPS_pubmethodSort(IComparer)

Sorts the contents of the DataGridView control using an implementation of the IComparer interface.

System_CAPS_pubmethodSuspendLayout()

Temporarily suspends the layout logic for the control.(Inherited from Control.)

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

System_CAPS_pubmethodUpdate()

Causes the control to redraw the invalidated regions within its client area.(Inherited from Control.)

System_CAPS_protmethodUpdateBounds()

Updates the bounds of the control with the current size and location.(Inherited from Control.)

System_CAPS_protmethodUpdateBounds(Int32, Int32, Int32, Int32)

Updates the bounds of the control with the specified size and location.(Inherited from Control.)

System_CAPS_protmethodUpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)

Updates the bounds of the control with the specified size, location, and client size.(Inherited from Control.)

System_CAPS_pubmethodUpdateCellErrorText(Int32, Int32)

Forces the cell at the specified location to update its error text.

System_CAPS_pubmethodUpdateCellValue(Int32, Int32)

Forces the control to update its display of the cell at the specified location based on its new value, applying any automatic sizing modes currently in effect.

System_CAPS_pubmethodUpdateRowErrorText(Int32)

Forces the row at the given row index to update its error text.

System_CAPS_pubmethodUpdateRowErrorText(Int32, Int32)

Forces the rows in the given range to update their error text.

System_CAPS_pubmethodUpdateRowHeightInfo(Int32, Boolean)

Forces the specified row or rows to update their height information.

System_CAPS_protmethodUpdateStyles()

Forces the assigned styles to be reapplied to the control.(Inherited from Control.)

System_CAPS_protmethodUpdateZOrder()

Updates the control in its parent's z-order.(Inherited from Control.)

System_CAPS_protmethodWndProc(Message)

Processes window messages.(Overrides Control.WndProc(Message).)

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 RowHeadersDefaultCellStyle property 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.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodISupportInitialize.BeginInit()

For a description of this member, see BeginInit.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISupportInitialize.EndInit()

For a description of this member, see EndInit.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragDrop(DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragDrop event.(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragEnter(DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragEnter event.(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragLeave(EventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragLeave event.(Inherited from Control.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragOver(DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragOver event.(Inherited from Control.)

The DataGridView control provides a customizable table for displaying data. The DataGridView class allows customization of cells, rows, columns, and borders through the use of properties such as DefaultCellStyle, ColumnHeadersDefaultCellStyle, CellBorderStyle, and GridColor. For more information, see Basic Formatting and Styling in the Windows Forms DataGridView Control.

You can use a DataGridView control to display data with or without an underlying data source. Without specifying a data source, you can create columns and rows that contain data and add them directly to the DataGridView using the Rows and Columns properties. You can also use the Rows collection to access DataGridViewRow objects and the DataGridViewRow.Cells property to read or write cell values directly. The Item indexer also provides direct access to cells.

As an alternative to populating the control manually, you can set the DataSource and DataMember properties to bind the DataGridView to a data source and automatically populate it with data. For more information, see Displaying Data in the Windows Forms DataGridView Control.

When working with very large amounts of data, you can set the VirtualMode property to true to display a subset of the available data. Virtual mode requires the implementation of a data cache from which the DataGridView control is populated. For more information, see Data Display Modes in the Windows Forms DataGridView Control.

For additional information about the features available in the DataGridView control, see DataGridView Control (Windows Forms). The following table provides direct links to common tasks.

Although the DataGridView control replaces and adds functionality to the DataGrid control of previous versions, the DataGrid control is retained for both backward compatibility and future use if you choose. For more information, see Differences Between the Windows Forms DataGridView and DataGrid Controls.

System_CAPS_noteNote

The DataGridView control inherits both the ContextMenu and ContextMenuStrip properties from Control, but supports only the ContextMenuStrip property. Using the ContextMenu property with the DataGridView control has no effect.

The following code example demonstrates how to initialize an unbound DataGridView control.

using System;
using System.Drawing;
using System.Windows.Forms;

public class Form1 : System.Windows.Forms.Form
{
    private Panel buttonPanel = new Panel();
    private DataGridView songsDataGridView = new DataGridView();
    private Button addNewRowButton = new Button();
    private Button deleteRowButton = new Button();

    public Form1()
    {
        this.Load += new EventHandler(Form1_Load);
    }

    private void Form1_Load(System.Object sender, System.EventArgs e)
    {
        SetupLayout();
        SetupDataGridView();
        PopulateDataGridView();
    }

    private void songsDataGridView_CellFormatting(object sender,
        System.Windows.Forms.DataGridViewCellFormattingEventArgs e)
    {
        if (e != null)
        {
            if (this.songsDataGridView.Columns[e.ColumnIndex].Name == "Release Date")
            {
                if (e.Value != null)
                {
                    try
                    {
                        e.Value = DateTime.Parse(e.Value.ToString())
                            .ToLongDateString();
                        e.FormattingApplied = true;
                    }
                    catch (FormatException)
                    {
                        Console.WriteLine("{0} is not a valid date.", e.Value.ToString());
                    }
                }
            }
        }
    }

    private void addNewRowButton_Click(object sender, EventArgs e)
    {
        this.songsDataGridView.Rows.Add();
    }

    private void deleteRowButton_Click(object sender, EventArgs e)
    {
        if (this.songsDataGridView.SelectedRows.Count > 0 &&
            this.songsDataGridView.SelectedRows[0].Index !=
            this.songsDataGridView.Rows.Count - 1)
        {
            this.songsDataGridView.Rows.RemoveAt(
                this.songsDataGridView.SelectedRows[0].Index);
        }
    }

    private void SetupLayout()
    {
        this.Size = new Size(600, 500);

        addNewRowButton.Text = "Add Row";
        addNewRowButton.Location = new Point(10, 10);
        addNewRowButton.Click += new EventHandler(addNewRowButton_Click);

        deleteRowButton.Text = "Delete Row";
        deleteRowButton.Location = new Point(100, 10);
        deleteRowButton.Click += new EventHandler(deleteRowButton_Click);

        buttonPanel.Controls.Add(addNewRowButton);
        buttonPanel.Controls.Add(deleteRowButton);
        buttonPanel.Height = 50;
        buttonPanel.Dock = DockStyle.Bottom;

        this.Controls.Add(this.buttonPanel);
    }

    private void SetupDataGridView()
    {
        this.Controls.Add(songsDataGridView);

        songsDataGridView.ColumnCount = 5;

        songsDataGridView.ColumnHeadersDefaultCellStyle.BackColor = Color.Navy;
        songsDataGridView.ColumnHeadersDefaultCellStyle.ForeColor = Color.White;
        songsDataGridView.ColumnHeadersDefaultCellStyle.Font =
            new Font(songsDataGridView.Font, FontStyle.Bold);

        songsDataGridView.Name = "songsDataGridView";
        songsDataGridView.Location = new Point(8, 8);
        songsDataGridView.Size = new Size(500, 250);
        songsDataGridView.AutoSizeRowsMode =
            DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders;
        songsDataGridView.ColumnHeadersBorderStyle =
            DataGridViewHeaderBorderStyle.Single;
        songsDataGridView.CellBorderStyle = DataGridViewCellBorderStyle.Single;
        songsDataGridView.GridColor = Color.Black;
        songsDataGridView.RowHeadersVisible = false;

        songsDataGridView.Columns[0].Name = "Release Date";
        songsDataGridView.Columns[1].Name = "Track";
        songsDataGridView.Columns[2].Name = "Title";
        songsDataGridView.Columns[3].Name = "Artist";
        songsDataGridView.Columns[4].Name = "Album";
        songsDataGridView.Columns[4].DefaultCellStyle.Font =
            new Font(songsDataGridView.DefaultCellStyle.Font, FontStyle.Italic);

        songsDataGridView.SelectionMode =
            DataGridViewSelectionMode.FullRowSelect;
        songsDataGridView.MultiSelect = false;
        songsDataGridView.Dock = DockStyle.Fill;

        songsDataGridView.CellFormatting += new
            DataGridViewCellFormattingEventHandler(
            songsDataGridView_CellFormatting);
    }

    private void PopulateDataGridView()
    {

        string[] row0 = { "11/22/1968", "29", "Revolution 9", 
            "Beatles", "The Beatles [White Album]" };
        string[] row1 = { "1960", "6", "Fools Rush In", 
            "Frank Sinatra", "Nice 'N' Easy" };
        string[] row2 = { "11/11/1971", "1", "One of These Days", 
            "Pink Floyd", "Meddle" };
        string[] row3 = { "1988", "7", "Where Is My Mind?", 
            "Pixies", "Surfer Rosa" };
        string[] row4 = { "5/1981", "9", "Can't Find My Mind", 
            "Cramps", "Psychedelic Jungle" };
        string[] row5 = { "6/10/2003", "13", 
            "Scatterbrain. (As Dead As Leaves.)", 
            "Radiohead", "Hail to the Thief" };
        string[] row6 = { "6/30/1992", "3", "Dress", "P J Harvey", "Dry" };

        songsDataGridView.Rows.Add(row0);
        songsDataGridView.Rows.Add(row1);
        songsDataGridView.Rows.Add(row2);
        songsDataGridView.Rows.Add(row3);
        songsDataGridView.Rows.Add(row4);
        songsDataGridView.Rows.Add(row5);
        songsDataGridView.Rows.Add(row6);

        songsDataGridView.Columns[0].DisplayIndex = 3;
        songsDataGridView.Columns[1].DisplayIndex = 4;
        songsDataGridView.Columns[2].DisplayIndex = 0;
        songsDataGridView.Columns[3].DisplayIndex = 1;
        songsDataGridView.Columns[4].DisplayIndex = 2;
    }


    [STAThreadAttribute()]
    static void Main()
    {
        Application.EnableVisualStyles();
        Application.Run(new Form1());
    }
}

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft