DataGridView.RowValidated Event

Definition

Occurs after a row has finished validating.

C#
public event System.Windows.Forms.DataGridViewCellEventHandler RowValidated;
C#
public event System.Windows.Forms.DataGridViewCellEventHandler? RowValidated;

Event Type

Examples

The following code sample uses this event to clear up any error annotations that may have been left behind after validating the row.

C#
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;
    }
}

Remarks

This event is analogous to the Validated event. Use this event to perform post-processing on a row of values.

For more information about how to handle events, see Handling and Raising Events.

Applies to

Produkt Versioner
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also