'cross-referencing' DataTable's

Posted by Lee on Stack Overflow See other posts from Stack Overflow or by Lee
Published on 2010-06-15T06:57:00Z Indexed on 2010/06/15 7:12 UTC
Read the original article Hit count: 163

Filed under:
|
|

I have a DataGridView that is being filled with data from a table. Inside this table is a column called 'group' that has the ID of an individual group in another table.

What I would like to do, is when the DataGridView is filled, instead of showing the ID contained in 'group', I'd like it to display the name of the group. Is there some type of VB.net 'magic' that can do this, or do I need to cross-reference the data myself?

Here is a breakdown of what the 2 tables look like:

table1
id
group (this holds the value of column id in table 2)
weight
last_update

table2
id
description (this is what I would like to be displayed in the DGV.)

BTW - I am using Visual Studio Express.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about ADO.NET