Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2002, 07:03 AM
sblands sblands is offline
Junior Member
 
Join Date: Nov 2002
Posts: 3
Default Seting a default value in a TDBLookupComboBox control

I am trying to set a default value for my DBLookupComboBox in order to have a nice user interface but I cannot find the proper way to do it.

I have a control called DKLookupCLassification that point to a dataset that contains the list values. That works just fine.

But I would like to set a default value for it as well. I have tried to use the Text property but gets the error that it is a read-only attribute.

Any ideas how to get around that?

/Soren...
Reply With Quote
  #2  
Old 11-01-2002, 03:13 PM
Ted On The NeT Ted On The NeT is offline
Senior Member
 
Join Date: Apr 2001
Posts: 2,182
Default RE: Seting a default value in a TDBLookupComboBox control

you have to set the keyfield in the target database. So, if you have an product table (prod_id, prod_name) and a orderline table (order_id, prod_id) and have a lookup from the orderline table to the product table, just fill in the prod_id in the orderline table and you're done.

<tt>Greetz,
::TeD On The NeT::

=[ QUESTIONS ]=========================================
<ct>don't forget to accept this reply if it helped you! </ct>
================================================== =====

=[ EXTRA INFO ]========================================
Location : Netherlands (GMT +01.00)
Languages : English, Dutch, German
Age : 25
ICQ : Be smart and figure out what my UIN is...
================================================== =====
</tt>
Reply With Quote
  #3  
Old 11-04-2002, 08:36 AM
sblands sblands is offline
Junior Member
 
Join Date: Nov 2002
Posts: 3
Default RE: Seting a default value in a TDBLookupComboBox control

I'm not able to make it work.

I have set the properties you mention, but that does not display any default value in the display field of the combobox. That is what I want.

And another thing: I am bot able to type any characters in the display field as well.

Any ideas?
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 Off

Forum Jump


All times are GMT. The time now is 08:46 AM.


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