DataBind Event

The DataBind event is fired any time Encompass360 populates a form control using the data from the loan, a process called "data binding". You can use this event to modify the default behavior of the data binding. For example, you can customize the way in which your form displays the values from the loan.

Note: EventArgs describe the properties which can be read and/or written in order to affect the outcome of the event.

Supported By:

 

DataBind events are supported by check boxes, dropdown boxes, dropdown edit boxes, radio buttons, text boxes, and multi-line text boxes.

 

 

 

 

 

 

EventArgs Properties:

Cancel

Boolean

Read/Write

Set this property to True if you have overridden the default data binding behavior or to prevent the default data binding action from occurring.

Value

String

Read/Write

The underlying data value from the loan which will be used to populate the field. Modify this value to change the value to which the control is bound.

 

 

 

 

 

 

Example:

 

 

The following code assumes that a text box is placed on the form and associated with Field 981 (line item M1 from the Declarations section on Page 3 of the 1003). The underlying field can take on one of the following values:

  • PrimaryResidence

 

  • SecondaryResidence

 

 

 

  • Investment

 

 

 

However, we want the text box to display "PR", "SH", or "IP" for these values. To achieve this, we override the DataBind events to translate between the underlying field value and the displayed value. For example, the code in the DataBind event would be:

 

 

 

If EventArgs.Value = "PrimaryResidence" then

EventArgs.Value = "PR"

Else If EventArgs.Value = "SecondaryResidence" then

EventArgs.Value = "SH"

Else If EventArgs.Value = "Investment" then

EventArgs.Value = "IP"

Else

 

 

EventArgs.Value = ""

End If