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
0003229 [JEDI VCL] 00 JVCL Components minor always 2005-09-23 05:14 2007-01-03 12:39
Reporter Ramengo View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0003229: TJvDBTreeView not scrolling
Description Item selection is not updated if the linked dataset scrolls.
For example if a dataset scrolls, a linked DBGrid would move the selection to the current record. Instead, TJvDBTreeView does not.
Additional Information
Tags No tags attached.
Attached Files zip file icon DelphiTestCase.zip [^] (36,741 bytes) 2006-05-10 05:23
zip file icon DelphiTestCase1.zip [^] (39,122 bytes) 2006-06-09 05:56

- Relationships

-  Notes
(0008858)
obones (administrator)
2006-04-04 03:44

Can you test with the latest version and let us know if the problem is still there? If yes, I would appreciate if you could post the zipped sources of a sample application showing this behaviour.
(0009268)
Ramengo (reporter)
2006-05-10 05:26

Try this testcase. You must have Firebird 1.5 up and running.
Compile and run the program, expand the treeview and select any item; you'll note that relative DBGrid will update selection.
Now try navigating through DBGrid; the Treeview won't update the selection.
(0009269)
ivan_ra (developer)
2006-05-10 06:21

This can take significant time on big datasets. To synchronize dbgrid with JvDBTreeView You can write own handler for Dataset.AfterScroll:

procedure TForm1.IBDMasterDetailsAfterScroll(DataSet: TDataSet);
var
  OldAfterScroll:TDataSetNotifyEvent;
begin
  with JvDBTreeView2 do
  if (Selected = nil)
  or (TJvDBTreeNode(Selected).MasterValue<>DataSet.FieldByName(MasterField).Value)
  then
  begin
    OldAfterScroll := DataSet.AfterScroll;
    DataSet.AfterScroll := nil;
    try
      SelectNode(DataSet.FieldByName(JvDBTreeView2.MasterField).Value)
    finally
      DataSet.AfterScroll := OldAfterScroll;
    end;
  end;
end;

You must assign this handler AFTER dataset open (to escape infinite loop), for example in Form1.OnCreate tvent handler
(0009274)
Ramengo (reporter)
2006-05-11 03:22

I've added the procedure and assigned on TForm1.FormCreate after IBDMasterDetails.Open.
It seems to work but the item selection on the treeview is not shown.
(0009275)
ivan_ra (developer)
2006-05-11 04:23

Set property HideSelection = false
(0009277)
Ramengo (reporter)
2006-05-11 05:37

Thank you Ivan.
(0009524)
obones (administrator)
2006-06-09 03:06

So, ivan, what should be done here? Can we close the issue?
(0009545)
ivan_ra (developer)
2006-06-09 05:57

I think this can be closed. May be add DelphiTestCase into Examples folder?
(0009906)
obones (administrator)
2006-07-29 07:44

Make the database smaller (around 500k) and I'll add it to the examples.
Better yet, have it generated at the start of the program from random values.
(0010499)
obones (administrator)
2007-01-03 12:39

Ok, this is now considered fixed in SVN

- Issue History
Date Modified Username Field Change
2005-09-23 05:14 Ramengo New Issue
2006-04-04 03:44 obones Note Added: 0008858
2006-04-04 03:44 obones Status new => feedback
2006-05-10 05:23 Ramengo File Added: DelphiTestCase.zip
2006-05-10 05:26 Ramengo Note Added: 0009268
2006-05-10 06:21 ivan_ra Note Added: 0009269
2006-05-11 03:22 Ramengo Note Added: 0009274
2006-05-11 04:23 ivan_ra Note Added: 0009275
2006-05-11 05:37 Ramengo Note Added: 0009277
2006-06-09 03:06 obones Note Added: 0009524
2006-06-09 05:56 ivan_ra File Added: DelphiTestCase1.zip
2006-06-09 05:57 ivan_ra Note Added: 0009545
2006-07-29 07:44 obones Note Added: 0009906
2007-01-03 12:39 obones Status feedback => resolved
2007-01-03 12:39 obones Fixed in Version => Daily / SVN
2007-01-03 12:39 obones Resolution open => fixed
2007-01-03 12:39 obones Assigned To => obones
2007-01-03 12:39 obones Note Added: 0010499


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