FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : UserError Event |
'Declaration Public Event UserError As UserErrorEventHandler
'Usage Dim instance As SuperEditBase Dim handler As UserErrorEventHandler AddHandler instance.UserError, handler
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 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8