Grid Control 

Independent Cell or Row Logic

 

You can assign logic that is specific to a particular cell, column or row. The definition consists of a column name or number, row number and logic event. A maximum of 999 cell logic records can be created for a panel. The default logic that is defined on the Logic folder of the Grid dialogue will execute if a cell does not contain independent logic.

Access the Grid dialogue for the grid control (using the NOMADS Folder Style), and select the Cell Logic tab to specify the following:

Column or Name

Value to be placed in the 'Column or 'Column$ property (string or numeric). If zero (0), then the defined preset is assigned to all columns.

If no column names are assigned in Grid Format Definition (Format button on the Attributes folder), then the Column or Name column (on the Cell Logic folder) uses a Normal cell type.

If column names are assigned in Grid Format Definition, then the Column or Name column uses a Variable drop box that is loaded with the assigned column names. You can either select a column name from the drop box, type a column name, or enter a numeric value.

If the column name is not a valid variable, a message is displayed and you must enter a value. If the column name is a valid variable but does not match any of the known column names, a warning message informs you of the mismatch, and the value is considered valid. Warning messages are displayed only when the column value is initially entered or changed.

Row

Value to be placed in the 'Row property. It must be numeric. If zero (0) is entered, then the defined preset is assigned to all rows.

On Focus Logic

To be executed when a cell receives focus. Click the drop-down arrow to access a list of selections: Ignore, Perform, Call, Execute.

On Change Logic

To be executed when a cell loses focus. Click the drop-down arrow to access a list of selections: Ignore, Link, Perform, Call, Execute, Help, Jumpto, End.

Validation Logic

Validation program (no quotes) to be called when cell loses focus. NOMADS calls the validation program, using the following format in its call:

     "subprog[;entrypoint]",input$,id.column,id.row,err_msg$,tag_field$,old_value$,input_eom$

Where:

input$

Input that the user entered is automatically passed to this variable.

id.column

Column number of the cell.

id.row

Row number of the cell.

err_msg$

Error message to display. By default, this returns a null to the calling program.

tag_field$

User-defined tag field value (if any). NOMADS picks this up from your setting in the Validator property of the cell and passes it to the sub-program in the call.

old_value$

Old value for the field, passed to your sub-program in the call.

input_eom$

Hex value of the terminator used to end input. Terminator examples include $0D$ for Enter or $09$ for Tab to leave a cell.

Equivalent parameters should be used (a maximum of seven valid variable names) in the called program.

If the input is found to be invalid by your program, load the fourth variable with error message text. Once the exit is executed in your sub-program, control returns to *winproc, which checks this variable. If it contains a value other than null, a message box is displayed using the text assigned by your program and focus returns to the cell for a retry. The user cannot exit that cell until valid input is entered.

Formatting Logic

Formatter program (no quotes) to be called when cell loses focus. NOMADS calls the formatting program, using the following format in its call:

     "subprog[;entrypoint]",id.column,id.row,input$,tag_field$

Where:

id.column

Column number of the cell.

id.row

Row number of the cell.

input$

Input that the user entered is automatically passed to this variable.

tag_field$

User-defined tag field value (if any). NOMADS picks this up from your setting in the Formatter property of the cell and passes it to the sub-program in the call.

Equivalent parameters should be used (a maximum of four valid variable names) in the called program.

This interface consists of two grids. Various logic definition rows from the lower grid can be dragged to become columns in the upper grid (and vice versa) to customize the interface. Drag on the row or column header to transfer the logic definition. In addition, columns in the upper grid may be re-ordered by dragging the column header to its new location.