Code methods

The Code methods group provides access to the most commonly customized functions for the currently selected control in the Layout Editor.  For data bound controls such as a textbox displayed on the Add or Edit page, the Code methods show the Set, Get and Validate functions.  Similarly, selecting a button control shows its Click function, or selecting a dropdown list shows its SelectedIndexChanged, Populate and other functions. Zooming out to the Table Control or the Record Control level will display functions such as CreateWhereClause, LoadData, DataBind and SaveData that are relevant to the selected controls. 

Clicking ‘…’ button on Property Sheet for any method opens code editor. Modification of the code in the code editor automatically places a copy of the function in Section 1 of the underlying code file.  At any point, clicking Restore will remove all the customizations and reset the function to its originally created code.  Subsequent builds will also preserve the customizations, and the changes made will never be overwritten, unless explicitly restored.

Clicking the Code Docs button in the code editor opens documentation related to the specific method.

Some of the code methods are:

Code method

Description

CreateOrderBy

Constructs an ‘Order By’ object that defines the sorting order in the table or record control query.

CreateWhereClause_DropDown

Constructs the WHERE clause for the query that populates the dropdown list.

CreateWhereClause_ListBox

Constructs WHERE clause for the listbox query

Createwhereclause

Constructs WHERE clause for the table or record control query.

CheckedChanged

Implements your custom code when selected value changes in user interface control.

Click

Executes your custom code when button is clicked.

DataBind

Initializes all user interface controls to their corresponding database field values, using the fields’ respective initialization formulas.

Get

Retrieves value from the user interface control.

GetUIData

The GetUIData method is called from SaveData to retrieve the values from the user interface controls into a database record so that it can be saved

Init

Handles the Init event for this control.

Load

Handles the Load event for this control.

LoadData

Loads the data value from the database, sets the appropriate pagination and then calls the CreateWhereClause() and CreateOrderBy() code methods.

Populate

Initializes user interface control with values.

PreRender

Handles the PreRender event and then calls the LoadData() and DataBind() code methods.

SaveData

Saves data from the table or record control into the database.

SelectedIndexChanged

Implements your custom code when selected value changes in user interface control.

Set

Sets value into the user interface control.

TextChanged

 Executes your custom code when text is changed in user interface control.

Validate

Executes your custom data validation code on user interface control.