Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Like all Before events, you can use prevent the cell from entering into edit mode by setting the Cancel property to 1. Unlike other Before events, however, there is no matching AfterEdit event. Instead, the BeforeUpdate and AfterUpdate events are fired when a cell is leaving edit mode.

Using the Cancel property to cancel the event only works if the event was qualified synchronously.

...

Any of the 12 function keys can be assigned a task via the FunctionKey property. If a function key is used to trigger edit mode, then it will be passed via the Reason parameter. For example, using F4 to enter into edit mode will cause the Reason parameter to be set to "F4" as well.

...

Navigation triggered edit mode occurs when the user navigates from one cell in edit mode to another cell, and the edit mode carries over. For example, if all cells' CellEditMode properties are set to "Edit", they go into edit mode as soon as they receive focus. Therefore, you might see one of the following values in the Reason parameter as a result.

...

As you may have noticed, these are the same values that can be passed in the Cause parameter of the PosChanged and PosChanging events.

Typed Character Triggered Event Mode

...

ValueDescription
ComboDropDownThe cell is entering edit mode because it's combo drop down is appearing, whether by user action or by setting the ComboDropDown property
EditCellMethod The cell is entering edit mode because the EditCell method was called

...

Code Block
Transfer Param1 to Cell 
Transfer Param2 to Reason 

// When a user double clicks to edit a cell, display a custom edit window 
If Reason _EQC "Double Click" then 
    
   // Cancel the normal edit mode 
   Call Set_Property(CtrlEntId, "OLE.Cancel", 1) 
    
   // Use our own 
   Call Show_Custom_Edit_Window(CtrlEntId, Cell) 
    
end

See Also

BeforeUpdateAfterUpdatePosChangedPosChanging