DataGridView.RowValidated Evento

Definición

Tiene lugar después de que una fila haya terminado de validar.Occurs after a row has finished validating.

public:
 event System::Windows::Forms::DataGridViewCellEventHandler ^ RowValidated;
public event System.Windows.Forms.DataGridViewCellEventHandler RowValidated;
member this.RowValidated : System.Windows.Forms.DataGridViewCellEventHandler 
Public Custom Event RowValidated As DataGridViewCellEventHandler 

Ejemplos

En el ejemplo de código siguiente se usa este evento para borrar cualquier anotación de error que se haya dejado atrás después de validar la fila.The following code sample uses this event to clear up any error annotations that may have been left behind after validating the row.

private void RemoveAnnotations(Object sender, 
    DataGridViewCellEventArgs args) 
{
    foreach (DataGridViewCell cell in 
        songsDataGridView.Rows[args.RowIndex].Cells)
    {
        cell.ErrorText = String.Empty;
    }

    foreach (DataGridViewRow row in songsDataGridView.Rows)
    {
        row.ErrorText = String.Empty;
    }
}
Private Sub RemoveAnnotations(ByVal sender As Object, _
    ByVal args As DataGridViewCellEventArgs) _
    Handles songsDataGridView.RowValidated

    For Each cell As DataGridViewCell In _
        songsDataGridView.Rows(args.RowIndex).Cells
        cell.ErrorText = String.Empty
    Next

    For Each row As DataGridViewRow In songsDataGridView.Rows
        row.ErrorText = String.Empty
    Next

End Sub

Comentarios

Este evento es análogo al evento Validated.This event is analogous to the Validated event. Utilice este evento para realizar el procesamiento posterior en una fila de valores.Use this event to perform post-processing on a row of values.

Para obtener más información acerca de cómo controlar eventos, vea controlar y provocar eventos.For more information about how to handle events, see Handling and Raising Events.

Se aplica a

Consulte también: