Combine data from 2 tables in datagridview

  • Thread starter Thread starter Lars E.
  • Start date Start date
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.
 
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.
 
Back
Top