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

この実装では無視されます。

返品

ContextMenuStripまたはDataGridViewHeaderCellにショートカット メニューが割り当てられている場合はDataGridView。それ以外の場合はnull

注釈

DataGridViewHeaderCellにショートカット メニューがない場合、DataGridViewHeaderCellDataGridViewからショートカット メニューを継承します。 DataGridViewにもショートカット メニューがない場合、GetInheritedContextMenuStrip メソッドはnullを返します。

適用対象

こちらもご覧ください