Master - Detail
very simple to set up.
//Set up the master detail relation
//create the relation linking the tables
DataRelation myRel = new DataRelation("MasterDetail",
myDS.Tables["Master"].Columns["m_ID"],
myDS.Tables["Details"].Columns["m_ID"]);
//add the relation to your DataSets Relations collection
myDS.Relations.Add( myRel );
//bind the Master table to whatever (grid, combobox, listbox, textbox)
//if a grid
GridMaster.SetDataBindings( myDS, "Master" );
//bind the child table to your grid - note the qualified name used for
//the data member "TableName.RelationName"
GridDetails.SetDataBindings( myDS, "Master.MasterDetail" );
Thats all you have to do. Navigation is automatic - moving to a different
row in the Master table resets the Details grid.