語言

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 A 若 或 DataGridViewHeaderCellDataGridView 有快捷鍵選單;否則 null。

備註

如果 沒有DataGridViewHeaderCell捷徑選單,將會DataGridViewHeaderCell繼承捷徑選單。DataGridView 如果 也 DataGridView 沒有捷徑選單,則該 GetInheritedContextMenuStrip 方法會回傳 null。

適用於

另請參閱