Mega Search
23.2 Million


Sign Up

Make a donation  
TDBGrid.. need a column from another table!  
News Group: embarcadero.public.delphi.language.delphi.general

Hey gang

I am using a TDBGrid on one of my forms. It is using a datasource called 
files. This has a dataset table that is linked to another table datasource 
called accounts.

Now in the files table i have a column that is called file_type which is an 
integer.

Yup, you've guessed it, i have another table called file_types that has a 
file_type integer and a description that is a string. I need to display the 
file type name in the DBGrid.

Now I know i can select / join using a query however in this situation I 
need it to be done via datasource / tables as i need to be able to edit the 
data for the files table using the DBGrid.

Help!!!

JC

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 5:59 PM EST
From: Justin Case
 
Re: TDBGrid.. need a column from another table!  
News Group: embarcadero.public.delphi.language.delphi.general
Nevermind.. i got it using the fields editor and lookup!

Thanks anyway

JC


"Justin Case"  wrote in message 
news:710333@forums.embarcadero.com...
> Hey gang
>
> I am using a TDBGrid on one of my forms. It is using a datasource called 
> files. This has a dataset table that is linked to another table datasource 
> called accounts.
>
> Now in the files table i have a column that is called file_type which is 
> an integer.
>
> Yup, you've guessed it, i have another table called file_types that has a 
> file_type integer and a description that is a string. I need to display 
> the file type name in the DBGrid.
>
> Now I know i can select / join using a query however in this situation I 
> need it to be done via datasource / tables as i need to be able to edit 
> the data for the files table using the DBGrid.
>
> Help!!!
>
> JC

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 19-Jan-2015, at 7:22 PM EST
From: Justin Case