DataView Row Actions for an Outer Join
To observe DataView row actions for an OUTER JOIN, complete the following steps:
- Add a new row to the DataGridView (dataGridView1) and assign the CustomerID column ALFKI. Scroll to the bottom of the Orders DataTable (dataGridView2) and the Order Details DataTable (dataGridView3) and notice that the new row has been added to Orders DataTable, but not the Order Details DataTable. This occurs because the OrdersDetails DataTable does not have a CustomerID child row.
Also note that the OrderID column of the new row has taken a value automatically, because this column is defined as DataColumn.AutoIncrement in nwindDataSet1.
- Now select the newly added row and assign the ProductID to 10 (note that this column represents a column from the Order Details DataTable), and end editing. Observe that the new row has been added to the Order Details DataTable, with the OrderID column referencing the newly added row from the Orders DataTable.

- Add another row to the DataView's grid, and set its od_OrderId column (foreign key of Orders Details DataTable referencing the Orders DataTable) to the same value as in the previously added row. Next, assign the ProductID column to 12, and end editing. Observe that nothing has changed in the Orders DataTable, but a new row has been added to the Order Details DataTable. Note that a new row has not been added to the Orders DataTable because the od_OrderId column has been assigned with a value referencing the existing row from the Orders DataTable.
img border="0" alt="" src="ImagesExt/image9_22.png" width="549" height="329" />
- Set the view's OrderID column value (primary key of Orders DataTable) in one of the newly added rows to 20000. Observe that this value will be changed in the other view's added row, as well as the values of OrderID columns in the corresponding rows of Orders and Order Details DataTables.
