dbgrid and lookup

Posted on 1998-06-21
Last Modified: 2010-04-04
Does anyone know how to setup a table lookup field on a DBGrid ?

i try to do  by Tfield and 4 some reasone its just not working ? (ie - i"m not getting drop down in the dbgrid )

if some one can send me and example it would be great to

10x in advance

Question by:asi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3

Expert Comment

ID: 1354735
Hi Asi, I send you an example. Weired that it's not working - I just did the usual stuff.

In the example: "Size" has and attached drop down list with values 1-7.

Hope I got you right


Author Comment

ID: 1354736
i did it by the pickup list this is NOT a lookup field ...


Author Comment

ID: 1354737
i meant u did it by the pick list and this is not Lookup field which mean that the value in the drop down list is taken from another table

happy fro others unswer
all the best
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

ID: 1354738
Uh, Sorry, I'll try to make an example with a lookup field...

Accepted Solution

Matvey earned 50 total points
ID: 1354739
Hi again, I sent you another example with some lookup fields.

I also found instructions in the help, and as far as I can see they should be correct:

To create a lookup field in the New Field dialog box:

1.      Enter a name for the lookup field in the Name edit box. Do not enter the name of an existing field.
2.      Choose a data type for the field from the Type combo box.
3.      Enter the size of the field in the Size edit box, if appropriate. Size is only relevant for fields of type TStringField, TBytesField, and TVarBytesField.
4.      Select Lookup in the Field type radio group. Selecting Lookup enables the Dataset and Key Fields combo boxes.
5.      Choose from the Dataset combo box drop-down list the dataset in which to look up field values. The lookup dataset must be different from the dataset for the field component itself, or a circular reference exception is raised at run time. Specifying a lookup dataset enables the Lookup Keys and Result Field combo boxes.

6.      Choose from the Key Fields drop-down list a field in the current dataset for which to match values. To match more than one field, enter field names directly instead of choosing from the drop-down list. Separate multiple field names with semicolons.
7.      Choose from the Lookup Keys drop-down list a field in the lookup dataset to match against the Source Fields field you specified in step 6. To specify more than one field, enter field names directly instead. Separate multiple field names with semicolons.

8.      Choose from the Result Field drop-down list a field in the lookup dataset to return as the value of the lookup field you are creating. To return values from more than one field in the lookup dataset, enter field names directly instead. Separate multiple field names with semicolons.

Hope this helps

Author Comment

ID: 1354740
actually , i find out myself the problem , somehow the look up field have to be long integer
and not short
i have no clue why it is hapend but it solve me the problem
any way 4 your try i"m giving u the points
all the best


Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question