System.Windows.Forms.DataGrid: Method Members

The methods of System.Windows.Forms.DataGrid are listed below. For a list of all members, see the DataGrid Members list.

See Also: Inherited members from System.Windows.Forms.Control

Public Methods

BeginEdit(DataGridColumnStyle, int) : bool

Attempts to put the grid into a state where editing is allowed.

BeginInit()

Begins the initialization of a System.Windows.Forms.DataGrid that is used on a form or used by another component. The initialization occurs at run time.

Collapse(int)

Collapses child relations, if any exist for all rows, or for a specified row.

EndEdit(DataGridColumnStyle, int, bool) : bool

Requests an end to an edit operation taking place on the System.Windows.Forms.DataGrid control.

EndInit()

Ends the initialization of a System.Windows.Forms.DataGrid that is used on a form or used by another component. The initialization occurs at run time.

Expand(int)

Displays child relations, if any exist, for all rows or a specific row.

GetCellBounds(DataGridCell) : System.Drawing.Rectangle

Gets the System.Drawing.Rectangle of the cell specified by System.Windows.Forms.DataGridCell.

GetCellBounds(int, int) : System.Drawing.Rectangle

Gets the System.Drawing.Rectangle of the cell specified by row and column number.

GetCurrentCellBounds() : System.Drawing.Rectangle

Gets a System.Drawing.Rectangle that specifies the four corners of the selected cell.

HitTest(System.Drawing.Point) : DataGrid.HitTestInfo

Gets information, such as row and column number of a clicked point on the grid, about the grid using a specific System.Drawing.Point.

HitTest(int, int) : DataGrid.HitTestInfo

Gets information, such as row and column number of a clicked point on the grid, using the x and y coordinate passed to the method.

IsExpanded(int) : bool

Gets a value that indicates whether the node of a specified row is expanded or collapsed.

IsSelected(int) : bool

Gets a value indicating whether a specified row is selected.

NavigateBack()

Navigates back to the table previously displayed in the grid.

NavigateTo(int, string)

Navigates to the table specified by row and relation name.

ResetAlternatingBackColor()

Resets the DataGrid.AlternatingBackColor property to its default color.

override
ResetBackColor()

Resets the DataGrid.BackColor property to its default value.

override
ResetForeColor()

Resets the DataGrid.ForeColor property to its default value.

ResetGridLineColor()

Resets the DataGrid.GridLineColor property to its default value.

ResetHeaderBackColor()

Resets the DataGrid.HeaderBackColor property to its default value.

ResetHeaderFont()

Resets the DataGrid.HeaderFont property to its default value.

ResetHeaderForeColor()

Resets the DataGrid.HeaderForeColor property to its default value.

ResetLinkColor()

Resets the DataGrid.LinkColor property to its default value.

ResetLinkHoverColor()

Resets the DataGrid.LinkHoverColor property to its default value.

ResetSelectionBackColor()

Resets the DataGrid.SelectionBackColor property to its default value.

ResetSelectionForeColor()

Resets the DataGrid.SelectionForeColor property to its default value.

Select(int)

Selects a specified row.

SetDataBinding(object, string)

Sets the DataGrid.DataSource and DataGrid.DataMember properties at run time.

SubObjectsSiteChange(bool)

Adds or removes the System.Windows.Forms.DataGridTableStyle objects from the container that is associated with the System.Windows.Forms.DataGrid.

UnSelect(int)

Unselects a specified row.

Protected Methods

CancelEditing()

Cancels the current edit operation and rolls back all changes.

ColumnStartedEditing(System.Drawing.Rectangle)

Informs the System.Windows.Forms.DataGrid control when the user begins to edit the column at the specified location.

ColumnStartedEditing(Control)

Informs the System.Windows.Forms.DataGrid control when the user begins to edit a column using the specified control.

override
CreateAccessibilityInstance() : AccessibleObject

Constructs a new instance of the accessibility object for this control.

CreateGridColumn(System.ComponentModel.PropertyDescriptor) : DataGridColumnStyle

Creates a new System.Windows.Forms.DataGridColumnStyle with the specified System.ComponentModel.PropertyDescriptor.

CreateGridColumn(System.ComponentModel.PropertyDescriptor, bool) : DataGridColumnStyle

Creates a System.Windows.Forms.DataGridColumnStyle using the specified System.ComponentModel.PropertyDescriptor.

override
Dispose(bool)

Disposes of the resources (other than memory) used by the System.Windows.Forms.DataGrid.

GetOutputTextDelimiter() : string

Gets the string that is the delimiter between columns when row contents are copied to the Clipboard.

GridHScrolled(object, ScrollEventArgs)

Listens for the scroll event of the horizontal scroll bar.

GridVScrolled(object, ScrollEventArgs)

Listens for the scroll event of the vertical scroll bar.

OnAllowNavigationChanged(EventArgs)

Raises the DataGrid.AllowNavigationChanged event.

OnBackButtonClicked(object, EventArgs)

Listens for the caption's back button clicked event.

override
OnBackColorChanged(EventArgs)

Raises the Control.BackColorChanged event.

OnBackgroundColorChanged(EventArgs)

Raises the DataGrid.BackgroundColorChanged event.

override
OnBindingContextChanged(EventArgs)

Raises the Control.BindingContextChanged event.

OnBorderStyleChanged(EventArgs)

Raises the DataGrid.BorderStyleChanged event.

OnCaptionVisibleChanged(EventArgs)

Raises the DataGrid.CaptionVisibleChanged event.

OnCurrentCellChanged(EventArgs)

Raises the DataGrid.CurrentCellChanged event.

OnDataSourceChanged(EventArgs)

Raises the DataGrid.DataSourceChanged event.

override
OnEnter(EventArgs)

Raises the Control.Enter event.

OnFlatModeChanged(EventArgs)

Raises the DataGrid.FlatModeChanged event.

override
OnFontChanged(EventArgs)

Raises the Control.FontChanged event.

override
OnForeColorChanged(EventArgs)

Raises the Control.ForeColorChanged event.

override
OnHandleCreated(EventArgs)

Raises the Control.CreateHandle event.

override
OnHandleDestroyed(EventArgs)

Raises the Control.DestroyHandle event.

override
OnKeyDown(KeyEventArgs)

Raises the Control.KeyDown event.

override
OnKeyPress(KeyPressEventArgs)

Raises the Control.KeyPress event.

override
OnLayout(LayoutEventArgs)

Raises the Control.Layout event, which repositions controls and updates scroll bars.

override
OnLeave(EventArgs)

Raises the Control.Leave event.

override
OnMouseDown(MouseEventArgs)

Raises the Control.MouseDown event.

override
OnMouseLeave(EventArgs)

Creates the Control.MouseLeave event.

override
OnMouseMove(MouseEventArgs)

Raises the Control.MouseMove event.

override
OnMouseUp(MouseEventArgs)

Raises the Control.MouseUp event.

override
OnMouseWheel(MouseEventArgs)

Raises the Control.MouseWheel event.

OnNavigate(NavigateEventArgs)

Raises the DataGrid.Navigate event.

override
OnPaint(PaintEventArgs)

Raises the Control.Paint event.

override
OnPaintBackground(PaintEventArgs)

Overrides Control.OnPaintBackground(PaintEventArgs) to prevent painting the background of the System.Windows.Forms.DataGrid control.

OnParentRowsLabelStyleChanged(EventArgs)

Raises the DataGrid.ParentRowsLabelStyleChanged event.

OnParentRowsVisibleChanged(EventArgs)

Raises the DataGrid.ParentRowsVisibleChanged event.

OnReadOnlyChanged(EventArgs)

Raises the DataGrid.ReadOnlyChanged event

override
OnResize(EventArgs)

Raises the Control.Resize event.

OnRowHeaderClick(EventArgs)

Raises the DataGrid.RowHeaderClick event.

OnScroll(EventArgs)

Raises the DataGrid.Scroll event.

OnShowParentDetailsButtonClicked(object, EventArgs)

Raises the DataGrid.ShowParentDetailsButtonClick event.

override
ProcessDialogKey(Keys) : bool

Gets or sets a value that indicates whether a key should be processed further.

ProcessGridKey(KeyEventArgs) : bool

Processes keys for grid navigation.

override
ProcessKeyPreview(ref Message) : bool
Documentation for this section has not yet been entered.
ProcessTabKey(Keys) : bool

Gets a value indicating whether the Tab key should be processed.

ResetSelection()

Turns off selection for all rows that are selected.

ShouldSerializeAlternatingBackColor() : bool

Indicates whether the DataGrid.AlternatingBackColor property should be persisted.

ShouldSerializeBackgroundColor() : bool

Indicates whether the DataGrid.BackgroundColor property should be persisted.

ShouldSerializeCaptionBackColor() : bool

Gets a value indicating whether the DataGrid.CaptionBackColor property should be persisted.

ShouldSerializeCaptionForeColor() : bool

Gets a value indicating whether the DataGrid.CaptionForeColor property should be persisted.

ShouldSerializeGridLineColor() : bool

Indicates whether the DataGrid.GridLineColor property should be persisted.

ShouldSerializeHeaderBackColor() : bool

Indicates whether the DataGrid.HeaderBackColor property should be persisted.

ShouldSerializeHeaderFont() : bool

Indicates whether the DataGrid.HeaderFont property should be persisted.

ShouldSerializeHeaderForeColor() : bool

Indicates whether the DataGrid.HeaderForeColor property should be persisted.

ShouldSerializeLinkHoverColor() : bool

Indicates whether the DataGrid.LinkHoverColor property should be persisted.

ShouldSerializeParentRowsBackColor() : bool

Indicates whether the DataGrid.ParentRowsBackColor property should be persisted.

ShouldSerializeParentRowsForeColor() : bool

Indicates whether the DataGrid.ParentRowsForeColor property should be persisted.

ShouldSerializePreferredRowHeight() : bool

Indicates whether the DataGrid.PreferredRowHeight property should be persisted.

ShouldSerializeSelectionBackColor() : bool

Indicates whether the DataGrid.SelectionBackColor property should be persisted.

ShouldSerializeSelectionForeColor() : bool

Indicates whether the DataGrid.SelectionForeColor property should be persisted.