Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

DataGrid Methods

The methods of the DataGrid class are listed here. For a complete list of DataGrid class members, see the DataGrid Members topic.

Public Methods

public methodBeginEdit Attempts to put the grid into a state where editing is allowed.
public methodBeginInit 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.
public methodBeginInvoke (inherited from Control) Overloaded. Executes a delegate asynchronously on the thread that the control's underlying handle was created on.
public methodBringToFront (inherited from Control)

Supported by the .NET Compact Framework.

Brings the control to the front of the z-order.
public methodCollapse Collapses child relations, if any exist for all rows, or for a specified row.
public methodContains (inherited from Control) Retrieves a value indicating whether the specified control is a child of the control.
public methodCreateControl (inherited from Control) Forces the creation of the control, including the creation of the handle and any child controls.
public methodCreateGraphics (inherited from Control)

Supported by the .NET Compact Framework.

Creates the Graphics object for the control.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodDispose (inherited from Component)

Supported by the .NET Compact Framework.

Overloaded. Releases the resources used by the Component.
public methodDoDragDrop (inherited from Control) Begins a drag-and-drop operation.
public methodEndEdit Requests an end to an edit operation taking place on the System.Windows.Forms.DataGrid control.
public methodEndInit 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.
public methodEndInvoke (inherited from Control) Retrieves the return value of the asynchronous operation represented by the IAsyncResult object passed.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodExpand Displays child relations, if any exist, for all rows or a specific row.
public methodFindForm (inherited from Control) Retrieves the form that the control is on.
public methodFocus (inherited from Control)

Supported by the .NET Compact Framework.

Sets input focus to the control.
public methodGetCellBounds

Supported by the .NET Compact Framework.

Overloaded. Gets the Rectangle that specifies the four corners of a cell.
public methodGetChildAtPoint (inherited from Control) Retrieves the child control that is located at the specified coordinates.
public methodGetContainerControl (inherited from Control) Returns the next ContainerControl up the control's chain of parent controls.
public methodGetCurrentCellBounds Gets a Rectangle that specifies the four corners of the selected cell.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetNextControl (inherited from Control) Retrieves the next control forward or back in the tab order of child controls.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodHide (inherited from Control)

Supported by the .NET Compact Framework.

Conceals the control from the user.
public methodHitTest

Supported by the .NET Compact Framework.

Overloaded. Gets information about the System.Windows.Forms.DataGrid control at a specified point on the screen.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodInvalidate (inherited from Control)

Supported by the .NET Compact Framework.

Overloaded. Invalidates a specific region of the control and causes a paint message to be sent to the control.
public methodInvoke (inherited from Control)

Supported by the .NET Compact Framework.

Overloaded. Executes a delegate on the thread that owns the control's underlying window handle.
public methodIsExpanded Gets a value that indicates whether a specified row's node is expanded or collapsed.
public methodIsSelected

Supported by the .NET Compact Framework.

Gets a value indicating whether a specified row is selected.
public methodNavigateBack Navigates back to the table previously displayed in the grid.
public methodNavigateTo Navigates to the table specified by row and relation name.
public methodPerformLayout (inherited from Control) Overloaded. Forces the control to apply layout logic to child controls.
public methodPointToClient (inherited from Control)

Supported by the .NET Compact Framework.

Computes the location of the specified screen point into client coordinates.
public methodPointToScreen (inherited from Control)

Supported by the .NET Compact Framework.

Computes the location of the specified client point into screen coordinates.
public methodPreProcessMessage (inherited from Control) Preprocesses input messages within the message loop before they are dispatched.
public methodRectangleToClient (inherited from Control)

Supported by the .NET Compact Framework.

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

Supported by the .NET Compact Framework.

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

Supported by the .NET Compact Framework.

Forces the control to invalidate its client area and immediately redraw itself and any child controls.
public methodResetAlternatingBackColor Resets the AlternatingBackColor property to its default color.
public methodResetBackColor Overridden. Resets the BackColor property to its default value.
public methodResetBindings (inherited from Control) Resets the DataBindings property to its default value.
public methodResetCursor (inherited from Control) Resets the Cursor property to its default value.
public methodResetFont (inherited from Control) Resets the Font property to its default value.
public methodResetForeColor Overridden. Resets the ForeColor property to its default value.
public methodResetGridLineColor Resets the GridLineColor property to its default value.
public methodResetHeaderBackColor Resets the HeaderBackColor property to its default value.
public methodResetHeaderFont Resets the HeaderFont property to its default value.
public methodResetHeaderForeColor Resets the HeaderForeColor property to its default value.
public methodResetImeMode (inherited from Control) Resets the ImeMode property to its default value.
public methodResetLinkColor Resets the LinkColor property to its default value.
public methodResetRightToLeft (inherited from Control) Resets the RightToLeft property to its default value.
public methodResetSelectionBackColor Resets the SelectionBackColor property to its default value.
public methodResetSelectionForeColor Resets the SelectionForeColor property to its default value.
public methodResetText (inherited from Control) Resets the Text property to its default value.
public methodResumeLayout (inherited from Control) Overloaded. Resumes normal layout logic.
public methodScale (inherited from Control) Overloaded. Scales the control and any child controls.
public methodSelect

Supported by the .NET Compact Framework.

Overloaded. Selects a specified row.
public methodSelectNextControl (inherited from Control) Activates the next control.
public methodSendToBack (inherited from Control)

Supported by the .NET Compact Framework.

Sends the control to the back of the z-order.
public methodSetBounds (inherited from Control) Overloaded. Sets the bounds of the control.
public methodSetDataBinding Sets the DataSource and DataMember properties at run time.
public methodShow (inherited from Control)

Supported by the .NET Compact Framework.

Displays the control to the user.
public methodSuspendLayout (inherited from Control) Temporarily suspends the layout logic for the control.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.
public methodUnSelect

Supported by the .NET Compact Framework.

Unselects a specified row.
public methodUpdate (inherited from Control)

Supported by the .NET Compact Framework.

Causes the control to redraw the invalidated regions within its client area.

Protected Methods

protected methodAccessibilityNotifyClients (inherited from Control) Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.
protected methodCancelEditing Cancels the current edit operation and rolls back all changes.
protected methodColumnStartedEditing Overloaded. Informs the System.Windows.Forms.DataGrid control that the user has begun editing a column.
protected methodCreateAccessibilityInstance Overridden. Constructs a new instance of the accessibility object for this control.
protected methodCreateControlsInstance (inherited from Control) Creates a new instance of the control collection for the control.
protected methodCreateGridColumn Overloaded. Creates a new DataGridColumnStyle that is added to the control.
protected methodCreateHandle (inherited from Control) Creates a handle for the control.
protected methodDefWndProc (inherited from Control) Sends the specified message to the default window procedure.
protected methodDestroyHandle (inherited from Control) Destroys the handle associated with the control.
protected methodDispose

Supported by the .NET Compact Framework.

Overloaded. Overridden. See Control.Dispose.
protected methodFinalize (inherited from Component)

Supported by the .NET Compact Framework.

Overridden. Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
protected methodGetStyle (inherited from Control) Retrieves the value of the specified control style bit for the control.
protected methodGetTopLevel (inherited from Control) Determines if the control is a top-level control.
protected methodGridHScrolled Listens for the horizontal scrollbar's scroll event.
protected methodGridVScrolled Listens for the vertical scrollbar's scroll event.
protected methodInitLayout (inherited from Control) Called after the control has been added to another container.
protected methodInvokeGotFocus (inherited from Control) Raises the GotFocus event for the specified control.
protected methodInvokeLostFocus (inherited from Control) Raises the LostFocus event for the specified control.
protected methodInvokeOnClick (inherited from Control) Raises the Click event for the specified control.
protected methodInvokePaint (inherited from Control) Raises the Paint event for the specified control.
protected methodInvokePaintBackground (inherited from Control) Raises the PaintBackground event for the specified control.
protected methodIsInputChar (inherited from Control) Determines if a character is an input character that the control recognizes.
protected methodIsInputKey (inherited from Control) Determines whether the specified key is a regular input key or a special key that requires preprocessing.
protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.
protected methodOnAllowNavigationChanged Raises the AllowNavigationChanged event.
protected methodOnBackButtonClicked Listens for the caption's back button clicked event.
protected methodOnBackColorChanged Overridden. Raises the BackColorChanged event.
protected methodOnBackgroundColorChanged Raises the BackgroundColorChanged event.
protected methodOnBackgroundImageChanged (inherited from Control) Raises the BackgroundImageChanged event.
protected methodOnBindingContextChanged

Supported by the .NET Compact Framework.

Overridden. Raises the BindingContextChanged event.
protected methodOnBorderStyleChanged Raises the BorderStyleChanged event.
protected methodOnCaptionVisibleChanged Raises the CaptionVisibleChanged event.
protected methodOnCausesValidationChanged (inherited from Control) Raises the CausesValidationChanged event.
protected methodOnChangeUICues (inherited from Control) Raises the ChangeUICues event.
protected methodOnClick (inherited from Control)

Supported by the .NET Compact Framework.

Raises the Click event.
protected methodOnContextMenuChanged (inherited from Control) Raises the ContextMenuChanged event.
protected methodOnControlAdded (inherited from Control) Raises the ControlAdded event.
protected methodOnControlRemoved (inherited from Control) Raises the ControlRemoved event.
protected methodOnCreateControl (inherited from Control) Raises the CreateControl event.
protected methodOnCurrentCellChanged

Supported by the .NET Compact Framework.

Raises the CurrentCellChanged event.
protected methodOnCursorChanged (inherited from Control) Raises the CursorChanged event.
protected methodOnDataSourceChanged Raises the DataSourceChanged event.
protected methodOnDockChanged (inherited from Control) Raises the DockChanged event.
protected methodOnDoubleClick (inherited from Control) Raises the DoubleClick event.
protected methodOnDragDrop (inherited from Control) Raises the DragDrop event.
protected methodOnDragEnter (inherited from Control) Raises the DragEnter event.
protected methodOnDragLeave (inherited from Control) Raises the DragLeave event.
protected methodOnDragOver (inherited from Control) Raises the DragOver event.
protected methodOnEnabledChanged (inherited from Control)

Supported by the .NET Compact Framework.

Raises the EnabledChanged event.
protected methodOnEnter Overridden. Raises the Enter event.
protected methodOnFlatModeChanged Raises the FlatModeChanged event.
protected methodOnFontChanged Overridden. Raises the FontChanged event.
protected methodOnForeColorChanged Overridden. Raises the ForeColorChanged event.
protected methodOnGiveFeedback (inherited from Control) Raises the GiveFeedback event.
protected methodOnGotFocus (inherited from Control)

Supported by the .NET Compact Framework.

Raises the GotFocus event.
protected methodOnHandleCreated Overridden. Raises the CreateHandle event.
protected methodOnHandleDestroyed Overridden. Raises the DestroyHandle event.
protected methodOnHelpRequested (inherited from Control) Raises the HelpRequested event.
protected methodOnImeModeChanged (inherited from Control) Raises the ImeModeChanged event.
protected methodOnInvalidated (inherited from Control) Raises the Invalidated event.
protected methodOnKeyDown

Supported by the .NET Compact Framework.

Overridden. Raises the KeyDown event.
protected methodOnKeyPress

Supported by the .NET Compact Framework.

Overridden. Raises the KeyPress event.
protected methodOnKeyUp (inherited from Control)

Supported by the .NET Compact Framework.

Raises the KeyUp event.
protected methodOnLayout Overridden. Raises the Layout event that repositions controls and updates scroll bars.
protected methodOnLeave Overridden. Raises the Leave event.
protected methodOnLocationChanged (inherited from Control) Raises the LocationChanged event.
protected methodOnLostFocus (inherited from Control)

Supported by the .NET Compact Framework.

Raises the LostFocus event.
protected methodOnMouseDown

Supported by the .NET Compact Framework.

Overridden. Raises the MouseDown event.
protected methodOnMouseEnter (inherited from Control) Raises the MouseEnter event.
protected methodOnMouseHover (inherited from Control) Raises the MouseHover event.
protected methodOnMouseLeave Overridden. Creates the MouseLeave event.
protected methodOnMouseMove

Supported by the .NET Compact Framework.

Overridden. Raises the MouseMove event.
protected methodOnMouseUp

Supported by the .NET Compact Framework.

Overridden. Raises the MouseUp event.
protected methodOnMouseWheel Overridden. Raises the MouseWheel event.
protected methodOnMove (inherited from Control) Raises the Move event.
protected methodOnNavigate Raises the Navigate event.
protected methodOnNotifyMessage (inherited from Control) Notifies the control of Windows messages.
protected methodOnPaint

Supported by the .NET Compact Framework.

Overridden. Raises the Paint event.
protected methodOnPaintBackground

Supported by the .NET Compact Framework.

Overridden. Overrides Control.OnPaintBackground to prevent painting the background of the System.Windows.Forms.DataGrid control.
protected methodOnParentBackColorChanged (inherited from Control) Raises the BackColorChanged event when the BackColor property value of the control's container changes.
protected methodOnParentBackgroundImageChanged (inherited from Control) Raises the BackgroundImageChanged event when the BackgroundImage property value of the control's container changes.
protected methodOnParentBindingContextChanged (inherited from Control) Raises the BindingContextChanged event when the BindingContext property value of the control's container changes.
protected methodOnParentChanged (inherited from Control)

Supported by the .NET Compact Framework.

Raises the ParentChanged event.
protected methodOnParentEnabledChanged (inherited from Control) Raises the EnabledChanged event when the Enabled property value of the control's container changes.
protected methodOnParentFontChanged (inherited from Control) Raises the FontChanged event when the Font property value of the control's container changes.
protected methodOnParentForeColorChanged (inherited from Control) Raises the ForeColorChanged event when the ForeColor property value of the control's container changes.
protected methodOnParentRightToLeftChanged (inherited from Control) Raises the RightToLeftChanged event when the RightToLeft property value of the control's container changes.
protected methodOnParentRowsLabelStyleChanged Raises the ParentRowsLabelStyleChanged event.
protected methodOnParentRowsVisibleChanged Raises the ParentRowsVisibleChanged event.
protected methodOnParentVisibleChanged (inherited from Control) Raises the VisibleChanged event when the Visible property value of the control's container changes.
protected methodOnQueryContinueDrag (inherited from Control) Raises the QueryContinueDrag event.
protected methodOnReadOnlyChanged Raises the ReadOnlyChanged event
protected methodOnResize

Supported by the .NET Compact Framework.

Overridden. Raises the Resize event.
protected methodOnRightToLeftChanged (inherited from Control) Raises the RightToLeftChanged event.
protected methodOnRowHeaderClick Raises the RowHeaderClick event.
protected methodOnScroll Raises the Scroll event.
protected methodOnShowParentDetailsButtonClicked Raises the ShowParentDetailsButtonClick event.
protected methodOnSizeChanged (inherited from Control) Raises the SizeChanged event.
protected methodOnStyleChanged (inherited from Control) Raises the StyleChanged event.
protected methodOnSystemColorsChanged (inherited from Control) Raises the SystemColorsChanged event.
protected methodOnTabIndexChanged (inherited from Control) Raises the TabIndexChanged event.
protected methodOnTabStopChanged (inherited from Control) Raises the TabStopChanged event.
protected methodOnTextChanged (inherited from Control)

Supported by the .NET Compact Framework.

Raises the TextChanged event.
protected methodOnValidated (inherited from Control) Raises the Validated event.
protected methodOnValidating (inherited from Control) Raises the Validating event.
protected methodOnVisibleChanged (inherited from Control) Raises the VisibleChanged event.
protected methodProcessCmdKey (inherited from Control) Processes a command key.
protected methodProcessDialogChar (inherited from Control) Processes a dialog character.
protected methodProcessDialogKey Overridden. Gets or sets a value that indicates whether a key should be processed further.
protected methodProcessGridKey Processes keys for grid navigation.
protected methodProcessKeyEventArgs (inherited from Control) Processes a key message and generates the appropriate control events.
protected methodProcessKeyMessage (inherited from Control) Processes a keyboard message.
protected methodProcessKeyPreview Overridden. Previews a keyboard message and returns a value indicating if the key was consumed.
protected methodProcessMnemonic (inherited from Control) Processes a mnemonic character.
protected methodProcessTabKey Gets a value indicating whether the Tab key should be processed.
protected methodRecreateHandle (inherited from Control) Forces the re-creation of the handle for the control.
protected methodResetSelection Turns off selection for all rows that are selected.
protected methodRtlTranslateAlignment (inherited from Control) Overloaded. Converts the current alignment to the appropriate alignment to support right-to-left text.
protected methodRtlTranslateContent (inherited from Control) Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.
protected methodRtlTranslateHorizontal (inherited from Control) Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text.
protected methodRtlTranslateLeftRight (inherited from Control) Converts the specified LeftRightAlignment to the appropriate LeftRightAlignment to support right-to-left text.
protected methodScaleCore (inherited from Control) Performs the work of scaling the entire control and any child controls.
protected methodSelect (inherited from Control) Overloaded. Activates a control.
protected methodSetBoundsCore (inherited from Control) Performs the work of setting the specified bounds of this control.
protected methodSetClientSizeCore (inherited from Control) Sets the size of the client area of the control.
protected methodSetStyle (inherited from Control) Sets the specified style bit to the specified value.
protected methodSetTopLevel (inherited from Control) Sets the control as the top-level control.
protected methodSetVisibleCore (inherited from Control) Sets the control to the specified visible state.
protected methodShouldSerializeAlternatingBackColor Indicates whether the AlternatingBackColor property should be persisted.
protected methodShouldSerializeBackgroundColor Indicates whether the BackgroundColor property should be persisted.
protected methodShouldSerializeCaptionBackColor Gets a value indicating whether the CaptionBackColor property should be persisted.
protected methodShouldSerializeCaptionForeColor Gets a value indicating whether the CaptionForeColor property should be persisted.
protected methodShouldSerializeGridLineColor Indicates whether the GridLineColor property should be persisted.
protected methodShouldSerializeHeaderBackColor Indicates whether the HeaderBackColor property should be persisted.
protected methodShouldSerializeHeaderFont Indicates whether the HeaderFont property should be persisted.
protected methodShouldSerializeHeaderForeColor Indicates whether the HeaderForeColor property should be persisted.
protected methodShouldSerializeLinkHoverColor Indicates whether the LinkHoverColor property should be persisted.
protected methodShouldSerializeParentRowsBackColor Indicates whether the ParentRowsBackColor property should be persisted.
protected methodShouldSerializeParentRowsForeColor Indicates whether the ParentRowsForeColor property should be persisted.
protected methodShouldSerializePreferredRowHeight Indicates whether the PreferredRowHeight property should be persisted.
protected methodShouldSerializeSelectionBackColor Indicates whether the SelectionBackColor property should be persisted.
protected methodShouldSerializeSelectionForeColor Indicates whether the SelectionForeColor property should be persisted.
protected methodUpdateBounds (inherited from Control) Overloaded. Updates the bounds of the control.
protected methodUpdateStyles (inherited from Control) Forces the assigned styles to be reapplied to the control.
protected methodUpdateZOrder (inherited from Control) Updates the control in its parent's z-order.
protected methodWndProc (inherited from Control) Processes Windows messages.

See Also

DataGrid Class | System.Windows.Forms Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.