DataGridViewRowEventArgs Clase

Definición

Proporciona datos a los eventos DataGridView relacionados con filas.

public ref class DataGridViewRowEventArgs : EventArgs
public class DataGridViewRowEventArgs : EventArgs
type DataGridViewRowEventArgs = class
    inherit EventArgs
Public Class DataGridViewRowEventArgs
Inherits EventArgs
Herencia
DataGridViewRowEventArgs

Ejemplos

En el ejemplo de código siguiente se muestra el uso de este tipo.

private void dataGridView1_DefaultValuesNeeded(object sender,
    System.Windows.Forms.DataGridViewRowEventArgs e)
{
    e.Row.Cells["Region"].Value = "WA";
    e.Row.Cells["City"].Value = "Redmond";
    e.Row.Cells["PostalCode"].Value = "98052-6399";
    e.Row.Cells["Country"].Value = "USA";
    e.Row.Cells["CustomerID"].Value = NewCustomerId();
}
Private Sub dataGridView1_DefaultValuesNeeded(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) _
    Handles dataGridView1.DefaultValuesNeeded

    With e.Row
        .Cells("Region").Value = "WA"
        .Cells("City").Value = "Redmond"
        .Cells("PostalCode").Value = "98052-6399"
        .Cells("Country").Value = "USA"
        .Cells("CustomerID").Value = NewCustomerId()
    End With

End Sub

Comentarios

La DataGridViewRowEventArgs clase proporciona datos para los siguientes DataGridView eventos:

Constructores

DataGridViewRowEventArgs(DataGridViewRow)

Inicializa una nueva instancia de la clase DataGridViewRowEventArgs.

Propiedades

Row

Obtiene el DataGridViewRow asociado al evento.

Métodos

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.

(Heredado de Object)
GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Se aplica a

Consulte también