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

此實作予以忽略。

傳回

如果 ContextMenuStripDataGridViewHeaderCell 有被指派捷徑功能表,則為 DataGridView,否則為 null

備註

DataGridViewHeaderCell如果 沒有快捷方式功能表,則會 DataGridViewHeaderCell 繼承 的 DataGridView 快捷方式功能表。 DataGridView如果 也沒有快捷方式功能表,則 GetInheritedContextMenuStrip 方法會傳回 null

適用於

另請參閱