Hi Rasika,
Thank you for your interest in Syncfusion products.
If you want to create Parent-Child relationship using multiple key pairs in GridGroupingControl, you can add a multiple child table to single parent table (parent-child relation). In grid, at a time single datasource can be can referred. Please refer the code,
Code:
DataTable parentTable = GetParentTable();
DataTable childTable1 = GetChildTable1();
DataTable childTable2 = GetChildTable2();
GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor();
parentToChildRelationDescriptor.ChildTableName = "MyChildTable1";
parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;
parentToChildRelationDescriptor.RelationKeys.Add("parentID", "ParentID");
GridRelationDescriptor ptc = new GridRelationDescriptor();
ptc.ChildTableName = "MyChildTable2";
ptc.RelationKind = RelationKind.RelatedMasterDetails;
ptc.RelationKeys.Add("parentID", "ParentID");
// Add relation to ParentTable
gridGroupingControl1.TableDescriptor.Relations.Add(parentToChildRelationDescriptor);
gridGroupingControl1.TableDescriptor.Relations.Add(ptc);
// Register any DataTable/IList with SourceListSet, so that RelationDescriptor can resolve the name
this.gridGroupingControl1.Engine.SourceListSet.Add("MyParentTable", parentTable);
this.gridGroupingControl1.Engine.SourceListSet.Add("MyChildTable1", childTable1);
this.gridGroupingControl1.Engine.SourceListSet.Add("MyChildTable2", childTable2);
this.gridGroupingControl1.DataSource = parentTable;
Please let us know if you have any concern.
Regards,
Muthukumar k
Attachment:
Related_Master_Details_Demo_79b7639a.zip