ערוך

שתף באמצעות


DataGridViewColumnHeaderCell.GetInheritedContextMenuStrip(Int32) Method

Definition

Retrieves the inherited shortcut menu for the specified row.

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

The index of the row to get the ContextMenuStrip of. The index must be -1 to indicate the row of column headers.

Returns

The ContextMenuStrip of the column headers if one exists; otherwise, the ContextMenuStrip inherited from DataGridView.

Exceptions

rowIndex is not -1.

Applies to

See also