Environment: TMS VCL UI Pack 13.8.0.0 (installed via Smart Setup), Delphi 13 Florence, Win32, Windows 11.
This worked correctly with the older TMS VCL UI Pack we used under Delphi XE5.
Grid setup: TAdvStringGrid used as a memo list, goEditing enabled, two editable columns (0 = date, 1 = memo text).
OnCanEditCell allows columns 0 and 1.
Steps to reproduce:
- Click a memo cell (row N, col 1), type some text, then click another control on the form (another grid) without pressing Enter.
-> The text is kept. OK. - Come back to the memo grid. A new empty row (row N+1) is added and selected, then type some text in col 1 and click another control without pressing Enter.
-> The typed text disappears.
What we measured during step 2 (logged in OnKeyUp / OnEditChange / OnExit):
- While typing, Grid.EditMode = False and Screen.ActiveControl is the grid itself (not the TAdvInplaceEdit).
- The grid has exactly one TAdvInplaceEdit child. It is Visible, but its Text is empty while the user is typing.
- In OnExit, Grid.EditorMode = False and Cells[1, N+1] is empty.
In step 1 the same logging shows EditMode = True and the TAdvInplaceEdit contains the typed text.
How the new row is created and focused in our code:
- New rows are added with AddRow, then Row/Col are set and Select is called.
- After that the grid gets SetFocus (from our focus routine). On double click we call ShowCellEdit followed by SetFocus.
- The Enter handling (move to a new row via AddRow + Select) is wrapped in BeginUpdate/EndUpdate.
Additional observations:
- If we call SetFocus before ShowCellEdit, the text is lost even on the first edit.
- If we remove BeginUpdate/EndUpdate around the Enter handling, typing does not work at all.
It looks like the in-place editor does not receive focus / edit state when the grid gets SetFocus while the editor is (being) shown, so the typed text is never held in the editor and is discarded when focus leaves the grid.
Could you check this? Is there a property or a call we should use so that the second edit enters edit mode correctly, or is this a regression?
Thank you.