Title: Working with a grid control is there a way to get the double-click event?

Since 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
   ...
Authored by: Veryant Support on Mon, Nov 17th, 2014 at 7:00 PM
This question has been viewed 4985 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=235

Powered by PHPKB Knowledge Base Software