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 (如果存在的話),否則為繼承自 ContextMenuStripDataGridView

例外狀況

儲存格的 DataGridView 屬性值不是 null,而且指定的 rowIndex 小於 0 或大於控制項中的資料列數減去 1。

適用於

另請參閱