wrong reaction to pressing the esc key in stringgrid cell editor
Original Reporter info from Mantis: andreykorol
-
Reporter name: Andrey Korol
Original Reporter info from Mantis: andreykorol
- Reporter name: Andrey Korol
Description:
As i think, string grid editor bring two wrong result as reaction on pressing ESC-key:
- it leave new value in cell, but intuitively expected restore old value (like in Excel)
- this new value not handled by ValidateEntry. If pressed ESC - event OnValidateEntry is not executed
I propose to restore the old value:
Index: grids.pas
===================================================================
--- grids.pas (revision 51675)
+++ grids.pas (working copy)
@@ -9613,6 +9613,7 @@
VK_ESCAPE:
begin
doGridKeyDown;
+ SetEditText(FGrid.FEditorOldValue);
FGrid.EditorHide;
end;
else
or add validation new value (ResetEditor proсeed validation):
Index: grids.pas
===================================================================
--- grids.pas (revision 51675)
+++ grids.pas (working copy)
@@ -9613,7 +9613,7 @@
VK_ESCAPE:
begin
doGridKeyDown;
- FGrid.EditorHide;
+ FGrid.ResetEditor;
end;
else
doEditorKeyDown;