By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,469 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Combine data from 2 tables in datagridview

P: n/a
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.
Apr 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

<Lars E.> wrote in message news:%2*****************@TK2MSFTNGP02.phx.gbl...
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.

Apr 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.