Visual Basic (Declaration) | |
---|---|
Public Event UserError As UserErrorEventHandler |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As SuperEditBase Dim handler As UserErrorEventHandler AddHandler instance.UserError, handler |
C# | |
---|---|
public event UserErrorEventHandler UserError |
The event handler receives an argument of type UserErrorEventArgs containing data related to this event. The following UserErrorEventArgs properties provide information specific to this event.
Property | Description |
---|---|
ErrorCode (Inherited from FarPoint.Win.SuperEdit.ErrorEventArgs) | Gets the error code associated with an error event. |
ErrorInfo (Inherited from FarPoint.Win.SuperEdit.ErrorEventArgs) | Gets the additional error information associated with an error event. |
UserErrorCode | Gets the error code associated with a user error event. |
This event occurs when the user, code, or a database tries to provide invalid data to a control. The event can occur in a number of situations, such as when the user types an invalid character or tries to type a value that is out of range. Which values are invalid or out of range depends on the control type and the settings of their properties.
If you prefer that the control does not validate data as it is provided to the control, set the UserEntry property to FreeFormat.
Contrast this event with the InvalidData event. The UserError event may occur while the user is working in the control; for example, the user may try to type a letter into a control that is defined to allow only numbers. The InvalidData event occurs when the data in the control is validated as the focus leaves the control.
The UserErrorEventArgs class's UserErrorCode property returns information about the error that occurred. See that topic for more information and lists of the possible error codes.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2