Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a combo box in a grid?

Status
Not open for further replies.

ASkwar

Programmer
Jun 7, 2002
3
US
Hi.

I'm using Delphi 6 Pro with the Zeos Database components to access a MySQL server.

On this database, I've got two tables: adress_type and adress.

adress_type:
ID: INT
type: VARCHAR

adress:
ID: INT
name: VARCHAR
adress_type_ID: INT

adress.adress_type_ID is a "foreign" key referencing adress_type.ID. I'd like to display the contents from adress in a ZDBGrid using the following SQL:

SELECT a.ID, a.name, at.type
FROM adress a LEFT JOIN adress_type at ON a.adress_type_ID = at.ID

Furhter, the column at.type should not be displayed as a simple text column, but it instead it should be a (DB?)LookupComboBox *showing* all the possible values from adress_type and using adress_type.ID as the value.

Well - since I'm new to Delphi, I don't even have the slightest idea how I might do this.

Could somebody please be so kind and try to help me?

Thanks a lot,
Alexander Skwar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top