We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Relation between collection object and data table

Thread ID:

Created:

Updated:

Platform:

Replies:

55751 Feb 4,2007 06:58 PM UTC Feb 5,2007 10:03 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 4, 2007 06:58 PM UTC

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....




Administrator [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;