DataGridViewRowHeaderCell.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 を取得する行のインデックス。 列ヘッダーの行を示すには、このインデックスが -1 である必要があります。

戻り値

ContextMenuStrip

ある場合は、行の ContextMenuStrip。ない場合は、ContextMenuStrip から継承された DataGridView

例外

セルの DataGridView プロパティが null ではなく、指定した rowIndex が 0 未満か、コントロールに含まれる行数から 1 を引いた値を上回っています。

適用対象

こちらもご覧ください