Displaying Xref-Tables in Datagrid in VB.NET
I have two tables in different SQL Server databases I wish to cross-reference. I want to display all the fields from the first table along with the cross-referenced field from the second table on ONE LINE in a datagrid:
Table 1 record:
Field1 Code1
Table 2 record:
Code1 Value1
Datagrid results after join:
Field1 Value1
I've got the tables in the same dataset and defined a relationship between the tables. Now, how do I get the datagrid to display a field from table 1 and a field from table 2 on the same line in the datagrid (I do not think the master/detail binding applies in this instance, because it's a one-to-one relationship)? It feels like I need to create a view of some sort inside the dataset, but I don't know how to do so. Clues, anyone?
|