DataGridViewColumnHeaderCell.GetInheritedContextMenuStrip(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborer avec nous sur GitHub
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner des problèmes et des demandes de tirage (pull requests). Pour plus d’informations, consultez notre guide du contributeur.