Plop a GridControl on a form.
Set up the initial GridView with GridColumns for
the columns you wish to fetch from the Work_Order table. Include one for
the ID field and set its visible property to false if you wish to hide
it.
Add a level to the GridControl. Change its
name from "Level1" to "Orders".
Add a GridView (or CardView, etc.) to the
new level. This is the detail view.
Set up the detail view with GridColumns for the
columns you wish to fetch from the Work_Summary table. Include one for the
ID field.
In a place suitable for your application, add code
to fetch and bind your data. Something like this, for
example (C#):
_
// Invoke your method for fetching data from
the Work_Order table. See MSDN ADO.NET documentation for DataSet and
DataTable, etc.
// Assuming your method is named FetchWorkOrders
and returns a DataTable named "Work_Order" ...
DataTable workOrderTable =
FetchWorkOrders();
// Invoke your method for fetching data from
the Work_Summary table.
// Assuming your method is named FetchWorkSummaries
and returns a DataTable named "Work_Summary" ....
DataTable workSummaryTable =
FetchWorkSummaries();
// Create a DataSet and add the two DataTable
objects.
DataSet dataSet = new DataSet();
dataSet.Tables.Add( workOrderTable
);
dataSet.Tables.Add( workSummaryTable );
// Set up the relationship, using the same name as
the level you created in the grid control.
// Note that the references to each DataTable by
name works if you actually give each DataTable a name!
dataSet.Relations.Add(
"Orders",
dataSet.Tables[ "Work_Order" ].Columns[ "ID"
],
dataSet.Tables[ "Work_Summary" ].Columns[ "ID" ]
);
// Bind the data to the grid control.
DataViewManager dvm = new DataViewManager( dataSet
);
DataView dv = dvm.CreateDataView( dataSet.Tables[ "Work_Order" ]
);
gridControl.DataSource = dv;
_
Note that there are numerous methodologies for
fetching data from each database. That is not necessarily a Developer
Express thing, unless you are using eXpress Persistent Objects, which I have
not. Yet.