Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2004, 03:13 AM
vecchstef vecchstef is offline
Junior Member
 
Join Date: Jul 2001
Posts: 15
Default Problem with a lookup field

I have a ClientDataSet with a Lookup Field.
For this field I have to provide lookup values programmatically so I have used the following tip of Delphi Help:
"Tip: You can use a lookup cache to provide lookup values programmatically rather than from a secondary dataset. Be sure that the LookupDataSet property is nil. Then, use the LookupList property’s Add method to fill it with lookup values. Set the LookupCache property to True. The field will use the supplied lookup list without overwriting it with values from a lookup dataset."

For this field I haven't set the LookupDataSet property and I have set the LookupCache property to True.
Then I have written the following code:

.LookupList.Clear;
.LookupList.Add('V1', 'Value 1');
.LookupList.Add('V2', 'Value 2');
.LookupList.Add('V3', 'Value 3');
.LookupList.Add('V4', 'Value 4');

I have used a DBGrid to handle the DataSet fields.
In the DBGrid the drop-down list associated with the column of the lookup field results empty.

Is it a Delphi bug? (I have D6)


Stefano
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 09:19 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.