DataGridView.Parent 属性

定义

获取 DataGridView 的父对象。

public object Parent { get; }

属性值

Object

DataGridView 的父对象。

示例

有关演示如何使用此属性的代码示例,请参见 Microsoft.Office.Tools.Excel.Controls.Button.Parent 。 命名空间中的所有控件 Microsoft.Office.Tools.Excel.Controls 都具有功能等效的 Parent 属性。

注解

的父级 DataGridView 是一个容器控件,它将 DataGridView 与文档(而不是包含的)连接到 Range DataGridView

的父级 DataGridView 只能作为进行访问 Object

适用于