Visual Basic (Declaration) | |
---|---|
Public Event InvalidData As InvalidDataEventHandler |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As SuperEditBase Dim handler As InvalidDataEventHandler AddHandler instance.InvalidData, handler |
C# | |
---|---|
public event InvalidDataEventHandler InvalidData |
This event occurs when a control loses the focus if it contains invalid data. Which values are invalid depends on the control type and the settings of their properties.
If you prefer that the control does not validate data when it loses the focus, set the CanValidate property to false.
Contrast this event with the UserError event. The InvalidData event occurs when the data in the control is validated as the focus leaves the control. The UserError event occurs while the user is working in the control or when code or a database is providing code to the control; for example, the user may try to type a letter into an FpMask control that has a mask defined to allow only numbers.
For more information, see the LostFocus event in the Microsoft .NET Framework Reference.Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8