To Add an Event Handler for a Field
You can add an event handler for an original or custom field on the graph and DAC levels. The following sections provide detailed information:
To Add an Event Handler for a Field on the Graph Level
To add an event handler for a field control used on a single form, perform the following actions:
- Open the form in the browser and make the control visible on the form.
- On the form title bar, click Element Inspector.Note:If you need to activate the Element Inspector for a pop-up panel, a dialog box, or another UI element that opens in modal mode and makes the Customization Menu unavailable for selection, you can press Control-Alt.
to launch the
- On the form, click the control for which you are adding an event handler to open the Element Properties Dialog Box for the control.
- In the dialog box, click Customize.
- If there is no currently selected customization project and the inspector opens the
Select Customization Project Dialog Box, select an existing customization project or create a new one.
If the customization project does not contain a changeset for the form, the Customization Project Editor adds a Page item for the form to the project to keep the changeset to ASPX code of the form in the database. The container of the control is opened in the Screen Editor, and the control is selected in the Control Tree of the editor.
- If you need to provide additional business logic to process a control value immediately after the value is changed, follow the instructions described in To Add an Event Handler. If you need to override the existing business logic for the field, follow the instructions described in To Override an Event Handler.
To Add an Event Handler for a Field on the DAC Level
Typically, you develop an event handler to provide the business logic for a field on the graph level. However if you need to add the same business logic for a field used on multiple forms, you add the event handler on the DAC level as follow:
- Create a custom attribute, as described in Custom Attributes.
- Add the needed event handler to the custom attribute.
- Add the custom attribute to the field, as described in To Customize a Field on the DAC Level.