DataGridViewHeaderCell.GetInheritedContextMenuStrip(Int32) 方法

定义

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

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

被该实现所忽略。

返回

ContextMenuStrip

如果 ContextMenuStripDataGridViewHeaderCell 分配有快捷菜单,则为 DataGridView;否则为 null

注解

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

适用于

另请参阅