Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

dbgrid and lookup

Posted on 1998-06-21
6
Medium Priority
?
697 Views
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
b_asi@inter.net.il

10x in advance
asi


0
Comment
Question by:asi
  • 3
  • 3
6 Comments
 
LVL 3

Expert Comment

by:Matvey
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

Regards,
bosism@netvision.net.il
0
 

Author Comment

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

0
 

Author Comment

by:asi
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
asi
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Matvey
ID: 1354738
Uh, Sorry, I'll try to make an example with a lookup field...
0
 
LVL 3

Accepted Solution

by:
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
Regards,
Matvey
0
 

Author Comment

by:asi
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

asi
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

916 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