View Issue Details

IDProjectCategoryView StatusLast Update
0026191LazarusLCLpublic2014-11-06 12:57
ReporterPetr-KAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3 (SVN)Product Buildtrunk #43585 
Target Version1.4Fixed in Version1.3 (SVN) 
Summary0026191: DBGrid InplaceEditor stays locked and cannot be hided
DescriptionIf user is editing a field in dbgrid InplaceEditor and in Table.DataEvent(deFieldChanged, ...) modal form is showed, then TCustomDBGrid.InitiateAction is repeatly called.

TCustomDBGrid.InitiateAction calls EndUpdating and it "unlocks" editor forever. FEditorHidingCount is now set to -1.

I do not know why TCustomDBGrid.InitiateAction is calling EndUpdating, then I disable it in the included dbgrids.patch. This solves my problem, but I'am not sure if this solution is correct.
Steps To ReproduceIn the example code edit dbgrid cell and press Enter.
Close showed form and InplaceEdit is "Unlocked" forever.
TagsNo tags attached.
Fixed in Revision46157
LazTarget1.4
Widgetset
Attached Files
  • dbgrids.patch (518 bytes)
    Index: dbgrids.pas
    ===================================================================
    --- dbgrids.pas	(revision 43585)
    +++ dbgrids.pas	(working copy)
    @@ -3222,7 +3219,7 @@
       {$ifdef dbgDBGrid}DebugLn('===> DBGrid.InitiateAction INIT');{$endif}
       inherited InitiateAction;
       if (gsUpdatingData in FGridStatus) then begin
    -    EndUpdating;
    +    //EndUpdating; //If modal dialog is showed when InplaceEdior is visible, then FEditorHidingCount is set to -1
         {
         if EditorMode then begin
           Editor.SetFocus;
    
    dbgrids.patch (518 bytes)
  • test.tgz (128,815 bytes)

Activities

Petr-K

2014-05-19 13:44

reporter  

dbgrids.patch (518 bytes)
Index: dbgrids.pas
===================================================================
--- dbgrids.pas	(revision 43585)
+++ dbgrids.pas	(working copy)
@@ -3222,7 +3219,7 @@
   {$ifdef dbgDBGrid}DebugLn('===> DBGrid.InitiateAction INIT');{$endif}
   inherited InitiateAction;
   if (gsUpdatingData in FGridStatus) then begin
-    EndUpdating;
+    //EndUpdating; //If modal dialog is showed when InplaceEdior is visible, then FEditorHidingCount is set to -1
     {
     if EditorMode then begin
       Editor.SetFocus;
dbgrids.patch (518 bytes)

Petr-K

2014-05-19 13:52

reporter  

test.tgz (128,815 bytes)

Jesus Reyes

2014-09-08 07:37

developer   ~0076971

TBH, I don't remember why InitiateAction is called, I did that code almost 10 years ago a time when I did not had commit access and the changes accumulated in my working copy. One comment in the code would have been right but ....

Instead of the proposed patch I decided to use another fix, Unlocking needed a test anyway. Please test.

Petr-K

2014-11-06 12:57

reporter   ~0078952

Tested

Issue History

Date Modified Username Field Change
2014-05-19 13:44 Petr-K New Issue
2014-05-19 13:44 Petr-K File Added: dbgrids.patch
2014-05-19 13:52 Petr-K File Added: test.tgz
2014-05-19 19:37 Jesus Reyes Assigned To => Jesus Reyes
2014-05-19 19:37 Jesus Reyes Status new => assigned
2014-09-08 07:37 Jesus Reyes Fixed in Revision => 46157
2014-09-08 07:37 Jesus Reyes LazTarget => 1.4
2014-09-08 07:37 Jesus Reyes Note Added: 0076971
2014-09-08 07:37 Jesus Reyes Status assigned => resolved
2014-09-08 07:37 Jesus Reyes Fixed in Version => 1.3 (SVN)
2014-09-08 07:37 Jesus Reyes Resolution open => fixed
2014-09-08 07:37 Jesus Reyes Target Version => 1.4
2014-11-06 12:57 Petr-K Note Added: 0078952
2014-11-06 12:57 Petr-K Status resolved => closed