다음을 통해 공유


DataRepeaterDataErrorEventArgs 클래스

DataError 이벤트에 대한 데이터를 제공합니다.

상속 계층 구조

System.Object
  System.EventArgs
    Microsoft.VisualBasic.PowerPacks.DataRepeaterDataErrorEventArgs

네임스페이스:  Microsoft.VisualBasic.PowerPacks
어셈블리:  Microsoft.VisualBasic.PowerPacks.Vs(Microsoft.VisualBasic.PowerPacks.Vs.dll)

구문

‘선언
Public Class DataRepeaterDataErrorEventArgs _
    Inherits EventArgs
public class DataRepeaterDataErrorEventArgs : EventArgs
public ref class DataRepeaterDataErrorEventArgs : public EventArgs
type DataRepeaterDataErrorEventArgs =  
    class
        inherit EventArgs
    end
public class DataRepeaterDataErrorEventArgs extends EventArgs

DataRepeaterDataErrorEventArgs 형식에서는 다음과 같은 멤버를 노출합니다.

생성자

  이름 설명
Public 메서드 DataRepeaterDataErrorEventArgs DataRepeaterDataErrorEventArgs 클래스의 새 인스턴스를 초기화합니다.

위쪽

속성

  이름 설명
Public 속성 Control 가져옵니다는 Control 데이터 오류를 발생 합니다.
Public 속성 DataRepeaterItem 가져옵니다는 DataRepeaterItem 데이터 오류를 발생 합니다.
Public 속성 Exception 가져옵니다는 Exception 는 오류를 나타냅니다.
Public 속성 PropertyName 이 오류를 발생 시킨 컨트롤의 속성 이름을 가져옵니다.
Public 속성 ThrowException 코드 실행을 끝낸 후 예외를 throw 할지 여부를 나타내는 값을 가져오거나 설정 합니다.의 DataError 이벤트 처리기입니다.

위쪽

메서드

  이름 설명
Public 메서드 Equals 지정한 개체와 현재 개체가 같은지 여부를 확인합니다. (Object에서 상속됨)
Protected 메서드 Finalize 가비지 수집에서 회수하기 전에 개체에서 리소스를 해제하고 다른 정리 작업을 수행할 수 있게 합니다. (Object에서 상속됨)
Public 메서드 GetHashCode 특정 형식에 대한 해시 함수 역할을 합니다. (Object에서 상속됨)
Public 메서드 GetType 현재 인스턴스의 Type을 가져옵니다. (Object에서 상속됨)
Protected 메서드 MemberwiseClone 현재 Object의 단순 복사본을 만듭니다. (Object에서 상속됨)
Public 메서드 ToString 현재 개체를 나타내는 문자열을 반환합니다. (Object에서 상속됨)

위쪽

설명

DataError 이벤트를 사용 하 여 호출 하는 코드에서 throw 된 예외를 처리할 수는 DataRepeater 컨트롤 데이터 처리 작업 하는 동안.

예제

다음 예제 데이터를 사용 하는 방법을 보여 줍니다 있는 DataRepeaterDataErrorEventArgs 데이터 오류가 발생할 때 메시지를 표시 합니다.

Private Sub DataRepeater1_DataError(
    ByVal sender As Object, 
    ByVal e As Microsoft.VisualBasic.PowerPacks.DataRepeaterDataErrorEventArgs
  ) Handles DataRepeater1.DataError

    Dim ErrorMsg As String
    ' Create an error string.
    ErrorMsg = "Invalid value entered for " & e.Control.Name & ". "
    ErrorMsg = ErrorMsg & e.Exception.Message
    ' Display the error to the user.
    MsgBox(ErrorMsg)
    ' Do not raise an exception.
    e.ThrowException = False
End Sub
private void dataRepeater1_DataError(object sender, 
    Microsoft.VisualBasic.PowerPacks.DataRepeaterDataErrorEventArgs e)
{
    string ErrorMsg;
    // Create an error string.
    ErrorMsg = "Invalid value entered for " + e.Control.Name + ". ";
    ErrorMsg = ErrorMsg + e.Exception.Message;
    // Display the error to the user.
    MessageBox.Show(ErrorMsg);
    // Do not raise an exception.
    e.ThrowException = false;
}

스레드로부터의 안전성

이 형식의 모든 공용 static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

참고 항목

참조

Microsoft.VisualBasic.PowerPacks 네임스페이스

DataError

기타 리소스

DataRepeater 컨트롤 소개(Visual Studio)