GridControl is bound and the Master/Slave table is displayed ., Gridcontrol Master/Slave
DataTable dt1 = new DataTable (); {dt1.Columns. add ("no."); dt1.Columns. add ("name"); DataRow dr = dt1.NewRow (); dr [0] = "001"; dr [1] = "James"; dt1.Rows. add (dr); dr = dt1.NewRow (); dr [0] = "002"; dr [1] = ""; dt1.Rows. add (dr);} DataTable dt2 = new DataTable (); {dt2.Columns. add ("no."); dt2.Columns. add ("account amount"); DataRow dr = dt2.NewRow (); dr [0] = "001"; dr [1] = "100000"; dt2.Rows. add (dr); dr = dt2.NewRow (); dr [0] = "002"; dr [1] = "2000000"; dt2.Rows. add (dr);} DataSet ds = new DataSet (); ds. tables. add (dt1); ds. tables. add (dt2); DataRelation relation = new DataRelation ("account information", ds. tables [0]. columns ["no."], ds. tables [1]. columns ["no."]); ds. relations. add (relation); gridControl1.DataSource = ds. tables [0];
: