ComponentOne DataObjects for .NET
BeforeFieldChange Event (BaseLogic)

C1.Data.2 Assembly > C1.Data Namespace > BaseLogic Class : BeforeFieldChange Event
Fired before a field value is set.
Syntax
'Declaration
 
Public Event BeforeFieldChange As FieldChangeEventHandler
public event FieldChangeEventHandler BeforeFieldChange
Event Data

The event handler receives an argument of type FieldChangeEventArgs containing data related to this event. The following FieldChangeEventArgs properties provide information specific to this event.

PropertyDescription
The table object where the event has occurred.  
The field changing value.  
The field value after change.  
The field value before change.  
The row where the event has occurred.  
Remarks
This event can be used to specify validation logic that cannot be specified in the form of constraint expressions. Throwing an exception in this event disallows the change. When this event occurs, the field value is not yet modified. The new (proposed) value is available in the NewValue argument of the event.
See Also