Working with a grid control is there a way to get the double-click event?
Estimated Reading Time: 1 MinutesSince double click on grid cells make you edit the cell value, the event returned for double click is MSG-BEGIN-ENTRY.
During this event, you can inquire the ENTRY-REASON property in order to distinguish if double click used to edit the cell.
if event-type = msg-begin-entry
inquire screen1-gd1 entry-reason w-reason | w-reason is pic x(1).
evaluate w-reason
when x"00" |double click was used
...
when x"0d" |enter was used
...
when other |the digit in w-reason was used
...
end-evaluate
end-if
In order to receive this event, the grid must not have any PROTECTION. If you wish to avoid cell editing when the event occurs, set EVENT-ACTION to EVENT-ACTION-FAIL or EVENT-ACTION-FAIL-TERMINATE.
if event-type = msg-begin-entry
set event-action to event-action-fail
...