Events
The DynamicTable HTC supports the following events:
OnChange
OnError
OnRequire
OnValid
OnChange
The OnChange event fires when the user clicks either the Done button or the Remove button.
The event object property window.event.XMLlist is a standard XMLlist object hierarchy, including the state attribute in the record elements. For more information, see XMLlist and XMLrecord Properties.
When the OverX feature is used, the OverX record key will have the value '-1'. For more information about the OverX feature, see OverX Feature.
Return to top
OnError
The OnError event fires when the HTC encounters a developer error condition. In addition, if the m_bDebug variable in the HTC is set to True, an alert box appears. This switch can be very helpful in debugging problems that occur if you get the error message "The control could not load."
The event object property window.event.error contains a string with details about the error.
Return to top
OnRequire
The OnRequire event fires whenever the list changes from required to not required, or from not required to required.
The event object property window.event.required is set to True if the required attribute of the global element in the configuration data for the HTC is set to "Yes" and there are no rows in the table display. Otherwise it is set to False.
If the OverX feature is used, the table is required even if there are rows in the table as long as the OverX row is not completely filled in. For more information about the OverX feature, see OverX Feature.
Return to top
OnValid
The OnValid event fires whenever the user starts editing a row and again when editing is complete.
The event object property window.event.valid is set to False when the event is fired because a row is being edited. When editing is complete (when either the Cancel or Accept button is clicked), the value will be True.
This assures that the HTC cannot be saved when the user is in the middle of an edit.
Return to top