Relation between collection object and data table

Hi,

I am generating manual relation in grid grouping control. I have parent object as entity collection and child object as DataTable.
I am getting child table inserted below the parent but child table is coming blank..no values.
I have child table values present as per mapping key....
Please help me to solve this problem...
I am not getting why child table is not showing any values....




1 Reply

AD Administrator Syncfusion Team February 5, 2007 10:03 PM UTC

Hi,

Please double check your GridRelationDescriptor.ChildTableName property is same as SourceListSetEntry.Name for childTable. see the below code snippet for more details.

GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor();
parentToChildRelationDescriptor.ChildTableName = "MyChildTable"; // same as SourceListSetEntry.Name for childTable.
parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;
parentToChildRelationDescriptor.RelationKeys.Add("parentID", "ParentID");

// 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("MyChildTable", childTable); //Here MyChildTable is the SourceListSetEntry.Name for childTable

Sample : RelatedMasterDetails.zip

Best regards,
Haneef

Loader.
Up arrow icon