Not sure if you are using Windows Forms or ASP.net, but if you are using Forms you should use the class
BindingSource
.
BindingSource Class[
^]
If you have a DataSet, dsExample, with two data tables, MasterTable and ChildTable, which have a parent child relation named MasterTable_ChildTable, you create two binding sources.
BindingSource bsMaster = new BindingSource();
bsMaster.DataSource = dsExample;
bsMaster.DataMember = "MasterTable";
BindingSource bsChild = new BindingSource();
bsChild.DataSource = bsMaster;
bsChild.DataMember = "MasterTable_ChildTable";
dataGridMaster.DataSource = bsMaster;
dataGridChild.DataSource = bsChild;
Now the values in your datagrid with child data should change when you change rows in the master grid.
I hope this will help you on the way.