Klasa DataRepeaterDataErrorEventArgs
Dostarcza dane dla DataError zdarzenia.
Hierarchia dziedziczenia
Object
EventArgs
Microsoft.VisualBasic.PowerPacks.DataRepeaterDataErrorEventArgs
Przestrzeń nazw: Microsoft.VisualBasic.PowerPacks
Zestaw: Microsoft.VisualBasic.PowerPacks.Vs (w Microsoft.VisualBasic.PowerPacks.Vs.dll)
Składnia
'Deklaracja
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
Typ DataRepeaterDataErrorEventArgs uwidacznia następujące elementy członkowskie.
Konstruktorzy
Nazwa | Opis | |
---|---|---|
![]() |
DataRepeaterDataErrorEventArgs | Inicjuje nowe wystąpienie DataRepeaterDataErrorEventArgs klasy. |
Początek
Właściwości
Nazwa | Opis | |
---|---|---|
![]() |
Control | Pobiera Control , wywoływane błąd danych. |
![]() |
DataRepeaterItem | Pobiera DataRepeaterItem , wywoływane błąd danych. |
![]() |
Exception | Pobiera Exception , reprezentuje błąd. |
![]() |
PropertyName | Pobiera nazwę właociwooci formantu, który wzbudził błąd. |
![]() |
ThrowException | Zwraca lub ustawia wartość, która wskazuje, czy po kończy wykonywanie kodu, Zgłoś wyjątek, DataError programu obsługi zdarzeń. |
Początek
Metody
Nazwa | Opis | |
---|---|---|
![]() |
Equals | Determines whether the specified object is equal to the current object. (Odziedziczone z Object). |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Odziedziczone z Object). |
![]() |
GetHashCode | Serves as the default hash function. (Odziedziczone z Object). |
![]() |
GetType | Gets the Type of the current instance. (Odziedziczone z Object). |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Odziedziczone z Object). |
![]() |
ToString | Returns a string that represents the current object. (Odziedziczone z Object). |
Początek
Uwagi
DataError Zdarzeń umożliwia obsługę wyjątków, które są generowane w kodzie, który jest wywoływany przez DataRepeater kontroli podczas operacji przetwarzania danych.
Przykłady
Poniższy przykład ilustruje sposób użyć danych z DataRepeaterDataErrorEventArgs do wyświetlania wiadomości, gdy wystąpi błąd danych.
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;
}
Bezpieczeństwo wątku
Wszystkie publiczne static (Shared w języku Visual Basic) elementy członkowskie tego typu są bezpieczne dla wątków. Wystąpienia elementów członkowskich nie dają gwarancji bezpieczeństwa wątków.
Zobacz też
Informacje
Przestrzeń nazw Microsoft.VisualBasic.PowerPacks