|Anonymous | Login | Signup for a new account||2019-04-20 11:23 CEST|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0001677||[JEDI VCL] 00 JVCL Components||major||always||2004-04-21 04:00||2005-04-12 08:50|
|Summary||0001677: JvDBLookupCombo does not update text when changed|
I am placing a JvDBLookupCombo on a form and assigning just the datasource and datafield properties to display a fkLookup field of a ClientDataSet.
The text displayed in the edit portion of the control remains unchanged when I select a new value from the drop down list. However, scrolling to another record and then back again shows that the dataset has actually been updated because the text is now correct.
|Additional Information||This behaviour is replicable using code from 2004-04-21|
|Tags||No tags attached.|
|Have you tried debugging it to find the cause of the problem?|
|point taken. i will look into it.|
|Thanks, I am a bit busy at the moment :)|
|Stepping through JvDBLookupCombo.CloseUp is interesting. SelectKeyValue is called by CloseUp and LookupList mouse events in an erratic order, so the SelectKeyValue that CloseUp tries to assign is sometimes wrong before it starts and other times sets the correct value only to have something else reset it. I spent some time on this and didn't get too far :(|
|I'll see if I can find some time to look into this during the weekend.|
|It appears someone has fixed this control. I can't find a bugnote describing the fix or who did it, but the latest code works. Thanks :)|
|Could it be related to 0001678?|
Hmmm, the news is not as good as i had hoped.
The JvDBLookupCombo does not work when the DataSource/DataField are used (ie when a lookup field is displayed).
However the control DOES work if the ListSource/ListField are used (as if the control were used to control the master in a master/detail relationship).
I have traced through the code and observe that the correct text is displayed for an instant after the a combo item is selected, then the original text is drawn back again. The actual item selected does change, it is just the display that is wrong. There is some thread that restores the old display value. I found that if I put a breakpoint in at some locations and waited for a couple of seconds the control then worked.
Also, I don't believe this is related to 0001678?
I will provide additional information / assistance isolating the problem if you are unable to replicate it. Let me know.
Please provide us with more details, especially after having tested with the latest JCL/JVCL available here:
|I just downloaded the latest code, will test it tomorrow. Thanks for the interest :)|
The problem is still there in the latest source. I tested on Delphi 7.1 with JCL and JVCL downloaded on Saturday 2004-08-07.
Steps to reproduce:
1. Setup a lookup relationship in a database
a. Create 2 tables in a database, call them Dogs and DogTypes
b. Add a field called KeyID of type AutoInc to both tables
c. Add a field called Name of type string to both tables
d. Add a field called TypeID of type integer to Dogs.
e. Put some data in the tables
2. Setup delphi datasets
a. Add ADOTables (or whatever) for the two tables.
b. Add a datasource for the dogs table, called DogsDataSource
c. Add all fields to both tables.
d. Additionally, add a lookup field to the Dogs table, called DogTypeName
that links TypeID in Dogs to KeyID in DogType
3. Setup a form to display the data
a. Add a DBGrid, DBLookupComboBox and JvDBLookupCombo to a form.
b. Make DogDataSource the DataSource for all 3 DB components.
c. Make DogTypeName the datafield for the 2 combo boxes.
d. Add fields to the DBGrid, show the Name and DogTypeName
4. Run the app
a. Changing the selected item in the JvDBLookupCombo does NOT work.
ie Try picking something in the list. The item you select is actually
displayed for a fraction of a second before the old value is redrawn.
Ok, that was a bit wordy, but I am sure you follow my meaning. It is easy to see that the DBComboBox works fine, but the Jedi equivalent is unusable.
The problem is limited to using the control to display lookup fields. The following features DO work:
1. Scrolling through the DBGrid DOES update the displayed value in the JvDBLookup.
2. Using the ListSource and ListField (in other circumstances) does work.
ie If the JvDBLookupComobo is used to display DogTypes, the grid to display Dogs and the MasterSource, etc of Dogs is setup properly then the JvDBLookup DOES work.
Let me know if you are unable to reproduce this error. I will upload sample code and/or database upon request. Cheers.
Could you please try with the latest daily zips available here:
If the problem is not fixed, please post a test project.
|No answers, this is assumed to be fixed.|
|2004-04-21 04:00||hamilton||New Issue|
|2004-04-21 04:03||hamilton||Issue Monitored: hamilton|
|2004-04-22 00:23||user72||Note Added: 0003987|
|2004-04-22 00:23||user72||Status||new => feedback|
|2004-04-22 05:27||hamilton||Note Added: 0004002|
|2004-04-22 09:01||user72||Note Added: 0004013|
|2004-04-22 13:06||hamilton||Note Added: 0004015|
|2004-04-23 06:16||user72||Note Added: 0004034|
|2004-05-26 11:51||hamilton||Note Added: 0004364|
|2004-05-26 23:51||user72||Note Added: 0004368|
|2004-05-27 08:27||hamilton||Note Added: 0004375|
|2004-08-03 07:31||obones||Note Added: 0004891|
|2004-08-07 03:28||anonymous||Note Added: 0004958|
|2004-08-07 03:32||hamilton||Note Added: 0004959|
|2004-08-07 05:14||user72||Note Deleted: 0004958|
|2004-08-08 02:06||hamilton||Note Added: 0004966|
|2004-11-19 00:57||obones||Note Added: 0005660|
|2005-04-12 08:50||obones||Status||feedback => resolved|
|2005-04-12 08:50||obones||Resolution||open => fixed|
|2005-04-12 08:50||obones||Assigned To||=> obones|
|2005-04-12 08:50||obones||Note Added: 0006972|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|