更新时间:2023-10-06 10:01:22
I think this code will help to you
follow the following steps
1.Create object of DataRelation class
Exm.DataRelation drl = new DataRelation("Relation Name","Parent Column","Child Column",true);
2.Set Relation property of DataSet to that DataRelation
Exm.Dataset.Relations.Add(drl);