You can use SqlDataAdapter and Dataset to create Master-Detail tables.
Generate data adapters for both Master and Detail.
Fill the data using Dataset and then generate a Relation between both tables.
' Connect to Database and fill Data Adapter with DataSets.
Dim Conn as new SqlConnection(�lt;PROVIDER=�.>�
Dim DAMast as New SqlDataAdapter(“Select * from Master�,Conn)
Dim DADetail as New SqlDataAdapter(“Select * from Detail�Conn)
Dim DS as New DataSet
DAMast.Fill(DS,”Master�
DADetail.Fill(DS,”Detail�
' Create relation for the DataSet.
Dim myDataRelation As DataRelation myDataRelation = New DataRelation _
("MastDtls", DS.Tables("Master").Columns("Code"), _
DS.Tables("Detail").Columns("Mast_Code"))
' Add the relation to the DataSet.
DS.Relations.Add(myDataRelation)
' Assign Database to grids.
GridMast.SetDataBinding(DS,"Master")
GridDetail.SetDataBinding(DS, "Master.MastDtls")