Share via


DataGridView Class

Definition

Represents a Windows Forms DataGridView that can be added to a Microsoft Office Word document.

public ref class DataGridView : System::Windows::Forms::DataGridView
[System.ComponentModel.DefaultEvent("CellContentClick")]
[System.ComponentModel.DefaultProperty("Text")]
[System.ComponentModel.ToolboxItem(false)]
public class DataGridView : System.Windows.Forms.DataGridView
[<System.ComponentModel.DefaultEvent("CellContentClick")>]
[<System.ComponentModel.DefaultProperty("Text")>]
[<System.ComponentModel.ToolboxItem(false)>]
type DataGridView = class
    inherit DataGridView
Public Class DataGridView
Inherits DataGridView
Inheritance
DataGridView
Attributes

Remarks

The Microsoft.Office.Tools.Word.Controls.DataGridView is different from a System.Windows.Forms.DataGridView. The Microsoft.Office.Tools.Word.Controls.DataGridView has additional members that enable it to be added to a Word document and that give it additional methods and properties.

Do not use the constructor to create a new DataGridView. Use the AddDataGridView method to add a new DataGridView to a document.

Properties

AltHTML
Automation
Bottom

Gets the distance, in points, between the bottom edge of the DataGridView and the top edge of the document.

Height

Gets or sets the height of the DataGridView.

InlineShape

Gets the underlying InlineShape of the DataGridView.

Left

Gets or sets the distance, in points, between the left edge of the DataGridView and the left edge of the document.

Right

Gets the distance, in points, between the right edge of the DataGridView and the left edge of the document.

Shape

Gets the underlying Shape of the DataGridView.

Top

Gets or sets the distance, in points, between the top edge of the DataGridView and the top edge of the document.

Width

Gets or sets the width of the DataGridView in points.

Methods

Activate()

Activates the DataGridView.

Delete()

Deletes a dynamically created DataGridView from the document and removes it from the ControlCollection.

Select()

Selects the DataGridView.

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
SetVisibleCore(Boolean)

Applies to