Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004727 [JEDI VCL] 00 JVCL Components major always 2009-04-03 17:17 2011-06-10 16:09
Reporter nestor View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0004727: TjvDBGrid, EditControl lost it's value..
Description EditControl loses its value when it's in edit mode (visible) and we clicks on the empty part of the TJVDBGrid (where no rows visible)
see example: "project1'
Additional Information
Tags No tags attached.
Attached Files zip file icon jvdbgrid.zip [^] (10,203 bytes) 2009-04-03 17:17
zip file icon sample.zip [^] (12,288 bytes) 2009-04-29 16:19

- Relationships

-  Notes
(0015404)
nestor (reporter)
2009-04-11 15:07

Bug fixed by adding this code to "TJVDBGrid.onMouseDown"
var
  Cell: TGridCoord;
begin
   if Assigned(Datasource) and (Datasource.state in [dsEdit,dsInsert]) then
   begin
     MouseToCell(X,Y,Cell.X,cell.y);
     if Cell.Y = -1 then
       CloseControl;
   end;
end;
(0015478)
obones (administrator)
2009-04-29 15:30

I'm sorry, but the demo gives me an exception when leaving the editor: "unable to access field description as text".
This is under Delphi 2006.
Could you check why?
(0015493)
nestor (reporter)
2009-04-29 16:18

I works with Delphi2007.
Description field type changes from blob to string
see Sample.zip
(0015785)
obones (administrator)
2009-07-08 15:26

Ok, I can now see the bug.
But your fix does not work, it does not change the behavior under D2009 at the very least.
(0015789)
nestor (reporter)
2009-07-08 18:21

I'am using this fix now, and it works under D2007.

procedure ..MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  Cell: TGridCoord;
begin
  if Assigned(Datasource) and (Datasource.state in [dsEdit, dsInsert]) then
  begin
    MouseToCell(X, Y, Cell.X, cell.y);
    if Cell.Y = -1 then
      CloseAllControls;
  end;
...
(0015958)
obones (administrator)
2009-08-07 11:54

Where do you put this code?
Inside the TJvDBGrid.MouseDown procedure? If yes, where in this procedure?
(0015962)
nestor (reporter)
2009-08-07 13:47

Forget this code, it's a very bad fix.

New indication:
  No more bug reported when dgIndicator is not in TJVDBGrid.options.

(see code at line: 2368 in TJVDBGRID unit , procedure Mousedown )
(0016167)
obones (administrator)
2009-09-23 17:10

Then, what should be done here?
(0016173)
nestor (reporter)
2009-09-23 18:43

Just add before the line 2338 in jvDBGRID.pas (REV. 12461) this condition:
if Cell.Y < 0 then //(or if Cell.Y = -1 then )
(0016174)
nestor (reporter)
2009-09-23 18:46

Sorry
2009-09-23 18:43

Just add before the line 2338 in jvDBGRID.pas (REV. 12461) this condition:
if Cell.Y >= 0 then //(or if Cell.Y <> -1 then )
(0016963)
obones (administrator)
2009-12-04 16:03

Thanks, this is now fixed in SVN

- Issue History
Date Modified Username Field Change
2009-04-03 17:17 nestor New Issue
2009-04-03 17:17 nestor File Added: jvdbgrid.zip
2009-04-11 15:07 nestor Note Added: 0015404
2009-04-29 15:30 obones Note Added: 0015478
2009-04-29 15:30 obones Status new => feedback
2009-04-29 16:18 nestor Note Added: 0015493
2009-04-29 16:19 nestor File Added: sample.zip
2009-07-06 14:09 obones Status feedback => acknowledged
2009-07-08 15:26 obones Note Added: 0015785
2009-07-08 15:26 obones Status acknowledged => feedback
2009-07-08 18:21 nestor Note Added: 0015789
2009-08-07 11:54 obones Note Added: 0015958
2009-08-07 13:47 nestor Note Added: 0015962
2009-09-23 17:10 obones Note Added: 0016167
2009-09-23 18:43 nestor Note Added: 0016173
2009-09-23 18:46 nestor Note Added: 0016174
2009-12-04 16:03 obones Note Added: 0016963
2009-12-04 16:03 obones Status feedback => resolved
2009-12-04 16:03 obones Fixed in Version => Daily / SVN
2009-12-04 16:03 obones Resolution open => fixed
2009-12-04 16:03 obones Assigned To => obones
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker