DataGridViewRow.GetContextMenuStrip(Int32) Método
Definición
Obtiene el menú contextual de la fila.Gets the shortcut menu for the row.
public:
System::Windows::Forms::ContextMenuStrip ^ GetContextMenuStrip(int rowIndex);
public System.Windows.Forms.ContextMenuStrip GetContextMenuStrip (int rowIndex);
member this.GetContextMenuStrip : int -> System.Windows.Forms.ContextMenuStrip
Public Function GetContextMenuStrip (rowIndex As Integer) As ContextMenuStrip
Parámetros
- rowIndex
- Int32
Índice de la fila actual.The index of the current row.
Devoluciones
ContextMenuStrip que pertenece a la fila DataGridViewRow del índice especificado.A ContextMenuStrip that belongs to the DataGridViewRow at the specified index.
Excepciones
rowIndex
es -1.rowIndex
is -1.
rowIndex
es menor que cero o mayor o igual que el número de filas del control menos uno.rowIndex
is less than zero or greater than or equal to the number of rows in the control minus one.
Comentarios
Pase el GetContextMenuStrip método al indizador que usó para recuperar DataGridViewRow .Pass the GetContextMenuStrip method the indexer you used to retrieve the DataGridViewRow. No use la Index propiedad para el rowIndex
parámetro.Do not use the Index property for the rowIndex
parameter. Si la fila está compartida, Index es-1, que es un valor no válido para rowIndex
.If the row is shared, Index is -1, which is an invalid value for rowIndex
.