DataGridViewHeaderCell.GetInheritedContextMenuStrip(Int32) 方法

定义

获取标题单元格的快捷菜单。

public:
 override System::Windows::Forms::ContextMenuStrip ^ GetInheritedContextMenuStrip(int rowIndex);
public override System.Windows.Forms.ContextMenuStrip GetInheritedContextMenuStrip(int rowIndex);
public override System.Windows.Forms.ContextMenuStrip? GetInheritedContextMenuStrip(int rowIndex);
override this.GetInheritedContextMenuStrip : int -> System.Windows.Forms.ContextMenuStrip
Public Overrides Function GetInheritedContextMenuStrip (rowIndex As Integer) As ContextMenuStrip

参数

rowIndex
Int32

此实现忽略。

返回

如果ContextMenuStripDataGridViewHeaderCell已分配或具有快捷菜单,则为 ADataGridView;否则为 null

注解

DataGridViewHeaderCell如果没有快捷菜单,DataGridViewHeaderCell该菜单将从中DataGridView继承快捷菜单。 DataGridView如果它还没有快捷菜单,则GetInheritedContextMenuStrip该方法将返回null

适用于

另请参阅