Hello,
you can avoid that using the CancelClose event of the form. I do this, too.
(defun cancel_edit ()
(if isLabelEdit (dcl_Grid_CancelItemEdit MyGrid))
); cancel_edit
(defun c:OnCancelClose (isESCWasPressed)
(cancel_edit)
(/= isESCWasPressed 1) ;; avoids closing form after ENTER
); CancelClose
(defun c:OnBeginLabelEdit (intRow ontCol)
(setq isLabelEdit T)
;; ... someting else, too
); c:OnBeginLabelEdit
(defun c:OnEndLabelEdit (intRow ontCol)
;; ... someting else, too
(setq isLabelEdit nil)
); c:OnBeginLabelEdit
Fred