MSG-FINISH-ENTRY (value16393)

This event occurs when the user finishes editing a cell in a grid control. You can use this opportunity to validate the cell's contents and do any reformatting of the data. EVENT-DATA-1 contains the column number of the cell, and EVENT-DATA-2 contains its record number. For convenience, the properties X and Y are set to the cursor's cell for the duration of this event. This allows you to retrieve the entered data by simply performing an INQUIRE on CELL-DATA. To reformat the entered data, INQUIRE on CELL-DATA, perform the desired formatting, and MODIFY CELL-DATA with the reformatted data. Note that if you INQUIRE directly into a numeric or numeric-edited data item, you get automatic conversion similar to MOVE WITH CONVERSION (with simple truncation on overflow). For more sophisticated testing and reformatting, INQUIRE into an alphanumeric item and examine the data directly.

You can force the user to stay in entry mode on the current cell by setting EVENT-ACTION to EVENT-ACTION-FAIL. This is what you should usually do if the user enters invalid data.

Note: Like all controls that can be activated, grids generate the MSG-VALIDATE event. However, this occurs only when the user attempts to leave the grid entirely. This is not usually very useful, so it is best to do validation in response to MSG-FINISH-ENTRY.