Combine data from 2 tables in datagridview

L

Lars E.

Hi all.

I am trying to combine data from 2 tables in one datagridview.

I have tables: "Customer" and "CustomerContact".

I want to display Customer information (displaying all fields in customer and some fields from customercontact) in a datagridview. I am not using sql so innerjoin is not possible....

The relation between the tables are: Customer.c-custno = CustomerContact.cc-custno.

How can i do this ?
Any example code i can look in ?
(i am new to c# to explain easyly....)

Thanks.

Lars E.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

What you can do is either add the columns from the second table to the
first using a referenced expression (See DataColumn.Expression )

Or create a new table where all the columns are referenced expressions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top