संपादित करें

इसके माध्यम से साझा किया गया


DataGridViewHeaderCell.GetInheritedContextMenuStrip(Int32) Method

Definition

Gets the shortcut menu of the header cell.

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

Parameters

rowIndex
Int32

Ignored by this implementation.

Returns

A ContextMenuStrip if the DataGridViewHeaderCell or DataGridView has a shortcut menu assigned; otherwise, null.

Remarks

If the DataGridViewHeaderCell does not have a shortcut menu, the DataGridViewHeaderCell will inherit the shortcut menu from the DataGridView. If the DataGridView also does not have a shortcut menu, then the GetInheritedContextMenuStrip method will return null.

Applies to

See also