DataGridViewRowHeaderCell.GetInheritedContextMenuStrip(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定列繼承的捷徑選單。
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 。 索引必須 -1 以表示欄位標頭的列。
傳回
若存在,則為 ContextMenuStrip 該行的 ;否則,繼 ContextMenuStrip 承自 DataGridView。
例外狀況
該格子的性質 DataGridView 值不 null 為,且指定的 rowIndex 值小於 0 或大於控制列數減 1。