編集

次の方法で共有


DataGridViewRowHeaderCell.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 row if one exists; otherwise, the ContextMenuStrip inherited from DataGridView.

Exceptions

The value of the DataGridView property of the cell is not null and the specified rowIndex is less than 0 or greater than the number of rows in the control minus 1.

Applies to

See also