DataRepeaterDataErrorEventArgs Class
Provides data for the DataError event.
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
'Declaration
Public Class DataRepeaterDataErrorEventArgs _
Inherits EventArgs
'Usage
Dim instance As DataRepeaterDataErrorEventArgs
public class DataRepeaterDataErrorEventArgs : EventArgs
public ref class DataRepeaterDataErrorEventArgs : public EventArgs
public class DataRepeaterDataErrorEventArgs extends EventArgs
Remarks
The DataError event enables you to handle exceptions that are thrown in code that is called by a DataRepeater control during data processing operations.
Examples
The following example demonstrates how to use the data from a DataRepeaterDataErrorEventArgs to display a message when a data error occurs.
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;
}
Inheritance Hierarchy
System.Object
System.EventArgs
Microsoft.VisualBasic.PowerPacks.DataRepeaterDataErrorEventArgs
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
DataRepeaterDataErrorEventArgs Members
Microsoft.VisualBasic.PowerPacks Namespace