Tracks the reason why the grid user left entry mode and entered navigation mode. Its value is set by the control immediately before generation of a MSG-FINISH-ENTRY or a MSG-CANCEL-ENTRY event. It can be inquired by the event procedure for those events to determine why the user is leaving the field she or he was entering. FINISH-REASON is normally only inquired.
FINISH-REASON is a signed, integer property. It is set by the control to a termination or exception value, or one of several preset values. The preset values are described below, along with the name of a corresponding level 78 data item. These items are found in the COPY library acugui.def.
|-1||GRFR-BLANK-PAST-END||This is a special case in which the entry was finished by the user but canceled by the grid control because the user entered spaces into a blank row past the end of the grid. Instead of growing the grid in this case, the grid rejects the user's entry.|
|-2||GRFR-TERMINATING||The grid control is terminating in response to some external event. A typical reason for this would be if the user clicked on another control or window.|
|-3||GRFR-CELL-CLICKED||The user clicked another cell in the grid.|
|-4||GRFR-NAVIGATION-KEY||The user pressed a navigation key, such as an up or down arrow. This is not generated for the Tab key, because that key is sometimes a navigation key and sometimes not.|
|-5||GRFR-ESCAPE-KEY||The user pressed the Escape key.|
|-6||GRFR-ENTER-KEY||The user pressed the Enter key.|
|-7||GRFR-TAB-KEY||The user pressed the Tab key.|
Any other value indicates that the control received a termination or exception value and FINISH-REASON is the value received. For example, under the default keyboard configuration, if the user pressed function key F1, FINISH-REASON is set to 1. However, when the user's action corresponds to a preset value, the preset value takes precedence, because the control directly processes those keys. For example, if you configure the Tab key to return a termination value of 9, the control will still use a value of -7 (GRFR-TAB-KEY) when the user presses the Tab key.