DataGridView.CellValidated 이벤트

정의

셀의 유효성 검사가 완료된 후 발생합니다.

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

이벤트 유형

예제

다음 코드 예제를 사용 CellValidated 하는 방법에 설명 합니다 속성을 지우 ErrorText 는 이벤트입니다. 이 예제 CellValidating 에서 이벤트는 사용자가 셀에 유효하지 않은 데이터를 입력하는 경우 를 설정합니다 ErrorText . 이 예제는에서 사용할 수 있는 보다 큰 예제의 일부는 SelectionChanged 이벤트입니다.

private void DataGridView1_CellValidated(object sender,
    DataGridViewCellEventArgs e)
{
    // Clear any error messages that may have been set in cell validation.
    DataGridView1.Rows[e.RowIndex].ErrorText = null;
}
Private Sub CellValidated(ByVal sender As Object, _
    ByVal e As DataGridViewCellEventArgs) _
    Handles DataGridView1.CellValidated

    ' Clear any error messages that may have been set in cell validation.
    DataGridView1.Rows(e.RowIndex).ErrorText = Nothing
End Sub

설명

이 이벤트를 처리하는 것은 셀 값의 유효성 검사 후 처리에 유용합니다.

이벤트를 처리 하는 방법에 대 한 자세한 내용은 참조 하세요. 이벤트 처리 및 발생합니다.

적용 대상

추가 정보