View Issue Details

IDProjectCategoryView StatusLast Update
0004727JEDI VCL00 JVCL Componentspublic2011-06-10 16:09
ReporternestorAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.40 
Summary0004727: TjvDBGrid, EditControl lost it's value..
DescriptionEditControl 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'
TagsNo tags attached.

Activities

2009-04-03 17:17

 

jvdbgrid.zip (10,203 bytes)

nestor

2009-04-11 15:07

reporter   ~0015404

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;

obones

2009-04-29 15:30

administrator   ~0015478

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?

nestor

2009-04-29 16:18

reporter   ~0015493

I works with Delphi2007.
Description field type changes from blob to string
see Sample.zip

2009-04-29 16:19

 

sample.zip (12,288 bytes)

obones

2009-07-08 15:26

administrator   ~0015785

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.

nestor

2009-07-08 18:21

reporter   ~0015789

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;
...

obones

2009-08-07 11:54

administrator   ~0015958

Where do you put this code?
Inside the TJvDBGrid.MouseDown procedure? If yes, where in this procedure?

nestor

2009-08-07 13:47

reporter   ~0015962

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 )

obones

2009-09-23 17:10

administrator   ~0016167

Then, what should be done here?

nestor

2009-09-23 18:43

reporter   ~0016173

Just add before the line 2338 in jvDBGRID.pas (REV. 12461) this condition:
if Cell.Y < 0 then //(or if Cell.Y = -1 then )

nestor

2009-09-23 18:46

reporter   ~0016174

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 )

obones

2009-12-04 16:03

administrator   ~0016963

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