Grid InPlaceEditEvent
Posted: Mon Nov 28, 2022 12:11 pm
Hi to everyone,
I am using a Grid in which i am editing values cell by cell using VALID. This is the grid definition
I want the user to move to the next cell when he finishes editing the previous one and presses enter. So i use the ON INPLACEEDITEVENT procGridInplaceEditEvent() which is this one:
With NAVIGATION EXTENDED this works just fine. User edits a cell, presses ENTER and then the program moves him to the next cell and ready to type in the new values. Now my problem is that sometimes i may want to cancel the editing sequence, so i have a cancel button. The thing is that whatever i've tried i couldn't find a way to stop the VALID event running. So if you enter one cell to edit it then you have to move through the whole line of the grid until the VALID no longer procs.
Anyone has any idea of how to deal with it? Maybe i am going completely the wrong way with the ON InplaceEditEvent? Thanks in advance
I am using a Grid in which i am editing values cell by cell using VALID. This is the grid definition
Code: Select all
DEFINE GRID Grid_1
PARENT NewFields
ROW 50
COL 10
WIDTH 770
HEIGHT 470
WIDTHS aWidths
HEADERS aHeaders
ITEMS aItems
COLUMNVALID aValid
COLUMNWHEN aColumnWhen
INPLACEEDIT ainPlaceEdit
ON INPLACEEDITEVENT ProcGridInplaceEditEvent()
TOOLTIP ''
NOTABSTOP .F.
PAINTDOUBLEBUFFER .T.
VISIBLE .T.
SHOWHEADERS .T.
NOLINES .F.
READONLY .F.
ALLOWEDIT .T.
CELLNAVIGATION .T.
END GRIDCode: Select all
*-----------------------------------------
FUNCTION ProcGridInplaceEditEvent()
*-----------------------------------------
DO CASE
CASE This.IsInplaceEditEventFinish == .T.
_PushKey( VK_RETURN )
END CASE Anyone has any idea of how to deal with it? Maybe i am going completely the wrong way with the ON InplaceEditEvent? Thanks in advance